mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Renames in Frontend
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
import getNewArtist from 'Utilities/Artist/getNewArtist';
|
||||
|
||||
function getNewAlbum(album, payload) {
|
||||
const {
|
||||
searchForNewAlbum = false
|
||||
} = payload;
|
||||
|
||||
getNewArtist(album.artist, payload);
|
||||
|
||||
album.addOptions = {
|
||||
searchForNewAlbum
|
||||
};
|
||||
album.monitored = true;
|
||||
|
||||
return album;
|
||||
}
|
||||
|
||||
export default getNewAlbum;
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
function getNewArtist(artist, payload) {
|
||||
const {
|
||||
rootFolderPath,
|
||||
monitor,
|
||||
qualityProfileId,
|
||||
metadataProfileId,
|
||||
artistType,
|
||||
albumFolder,
|
||||
tags,
|
||||
searchForMissingAlbums = false
|
||||
} = payload;
|
||||
|
||||
const addOptions = {
|
||||
monitor,
|
||||
searchForMissingAlbums
|
||||
};
|
||||
|
||||
artist.addOptions = addOptions;
|
||||
artist.monitored = true;
|
||||
artist.qualityProfileId = qualityProfileId;
|
||||
artist.metadataProfileId = metadataProfileId;
|
||||
artist.rootFolderPath = rootFolderPath;
|
||||
artist.artistType = artistType;
|
||||
artist.albumFolder = albumFolder;
|
||||
artist.tags = tags;
|
||||
|
||||
return artist;
|
||||
}
|
||||
|
||||
export default getNewArtist;
|
||||
29
frontend/src/Utilities/Author/getNewAuthor.js
Normal file
29
frontend/src/Utilities/Author/getNewAuthor.js
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
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;
|
||||
18
frontend/src/Utilities/Book/getNewBook.js
Normal file
18
frontend/src/Utilities/Book/getNewBook.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import getNewAuthor from 'Utilities/Author/getNewAuthor';
|
||||
|
||||
function getNewBook(book, payload) {
|
||||
const {
|
||||
searchForNewBook = false
|
||||
} = payload;
|
||||
|
||||
getNewAuthor(book.author, payload);
|
||||
|
||||
book.addOptions = {
|
||||
searchForNewBook
|
||||
};
|
||||
book.monitored = true;
|
||||
|
||||
return book;
|
||||
}
|
||||
|
||||
export default getNewBook;
|
||||
@@ -1,8 +1,8 @@
|
||||
import _ from 'lodash';
|
||||
import { update } from 'Store/Actions/baseActions';
|
||||
|
||||
function updateAlbums(section, albums, bookIds, options) {
|
||||
const data = _.reduce(albums, (result, item) => {
|
||||
function updateBooks(section, books, bookIds, options) {
|
||||
const data = _.reduce(books, (result, item) => {
|
||||
if (bookIds.indexOf(item.id) > -1) {
|
||||
result.push({
|
||||
...item,
|
||||
@@ -18,4 +18,4 @@ function updateAlbums(section, albums, bookIds, options) {
|
||||
return update({ section, data });
|
||||
}
|
||||
|
||||
export default updateAlbums;
|
||||
export default updateBooks;
|
||||
Reference in New Issue
Block a user