Files
Readarr/frontend/src/Utilities/Author/getNewAuthor.js
T
2020-05-19 21:50:37 +01:00

30 lines
577 B
JavaScript

function getNewAuthor(author, payload) {
const {
rootFolderPath,
monitor,
qualityProfileId,
metadataProfileId,
authorType,
tags,
searchForMissingBooks = false
} = payload;
const addOptions = {
monitor,
searchForMissingBooks
};
author.addOptions = addOptions;
author.monitored = true;
author.qualityProfileId = qualityProfileId;
author.metadataProfileId = metadataProfileId;
author.rootFolderPath = rootFolderPath;
author.authorType = authorType;
author.tags = tags;
return author;
}
export default getNewAuthor;