mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Renames in Frontend
This commit is contained in:
+5
-5
@@ -1,9 +1,9 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import Modal from 'Components/Modal/Modal';
|
||||
import SelectArtistModalContentConnector from './SelectArtistModalContentConnector';
|
||||
import SelectAuthorModalContentConnector from './SelectAuthorModalContentConnector';
|
||||
|
||||
class SelectArtistModal extends Component {
|
||||
class SelectAuthorModal extends Component {
|
||||
|
||||
//
|
||||
// Render
|
||||
@@ -20,7 +20,7 @@ class SelectArtistModal extends Component {
|
||||
isOpen={isOpen}
|
||||
onModalClose={onModalClose}
|
||||
>
|
||||
<SelectArtistModalContentConnector
|
||||
<SelectAuthorModalContentConnector
|
||||
{...otherProps}
|
||||
onModalClose={onModalClose}
|
||||
/>
|
||||
@@ -29,9 +29,9 @@ class SelectArtistModal extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
SelectArtistModal.propTypes = {
|
||||
SelectAuthorModal.propTypes = {
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default SelectArtistModal;
|
||||
export default SelectAuthorModal;
|
||||
+13
-13
@@ -8,10 +8,10 @@ import ModalContent from 'Components/Modal/ModalContent';
|
||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||
import ModalBody from 'Components/Modal/ModalBody';
|
||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||
import SelectArtistRow from './SelectArtistRow';
|
||||
import styles from './SelectArtistModalContent.css';
|
||||
import SelectAuthorRow from './SelectAuthorRow';
|
||||
import styles from './SelectAuthorModalContent.css';
|
||||
|
||||
class SelectArtistModalContent extends Component {
|
||||
class SelectAuthorModalContent extends Component {
|
||||
|
||||
//
|
||||
// Lifecycle
|
||||
@@ -37,7 +37,7 @@ class SelectArtistModalContent extends Component {
|
||||
render() {
|
||||
const {
|
||||
items,
|
||||
onArtistSelect,
|
||||
onAuthorSelect,
|
||||
onModalClose
|
||||
} = this.props;
|
||||
|
||||
@@ -46,7 +46,7 @@ class SelectArtistModalContent extends Component {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
Manual Import - Select Artist
|
||||
Manual Import - Select Author
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody
|
||||
@@ -55,7 +55,7 @@ class SelectArtistModalContent extends Component {
|
||||
>
|
||||
<TextInput
|
||||
className={styles.filterInput}
|
||||
placeholder="Filter artist"
|
||||
placeholder="Filter author"
|
||||
name="filter"
|
||||
value={filter}
|
||||
autoFocus={true}
|
||||
@@ -65,13 +65,13 @@ class SelectArtistModalContent extends Component {
|
||||
<Scroller className={styles.scroller}>
|
||||
{
|
||||
items.map((item) => {
|
||||
return item.artistName.toLowerCase().includes(filter) ?
|
||||
return item.authorName.toLowerCase().includes(filter) ?
|
||||
(
|
||||
<SelectArtistRow
|
||||
<SelectAuthorRow
|
||||
key={item.id}
|
||||
id={item.id}
|
||||
artistName={item.artistName}
|
||||
onArtistSelect={onArtistSelect}
|
||||
authorName={item.authorName}
|
||||
onAuthorSelect={onAuthorSelect}
|
||||
/>
|
||||
) :
|
||||
null;
|
||||
@@ -90,10 +90,10 @@ class SelectArtistModalContent extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
SelectArtistModalContent.propTypes = {
|
||||
SelectAuthorModalContent.propTypes = {
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
onArtistSelect: PropTypes.func.isRequired,
|
||||
onAuthorSelect: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default SelectArtistModalContent;
|
||||
export default SelectAuthorModalContent;
|
||||
+13
-14
@@ -4,12 +4,12 @@ import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { updateInteractiveImportItem, saveInteractiveImportItem } from 'Store/Actions/interactiveImportActions';
|
||||
import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector';
|
||||
import SelectArtistModalContent from './SelectArtistModalContent';
|
||||
import createAllAuthorSelector from 'Store/Selectors/createAllAuthorsSelector';
|
||||
import SelectAuthorModalContent from './SelectAuthorModalContent';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createAllArtistSelector(),
|
||||
createAllAuthorSelector(),
|
||||
(items) => {
|
||||
return {
|
||||
items: [...items].sort((a, b) => {
|
||||
@@ -33,23 +33,22 @@ const mapDispatchToProps = {
|
||||
saveInteractiveImportItem
|
||||
};
|
||||
|
||||
class SelectArtistModalContentConnector extends Component {
|
||||
class SelectAuthorModalContentConnector extends Component {
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onArtistSelect = (authorId) => {
|
||||
const artist = _.find(this.props.items, { id: authorId });
|
||||
onAuthorSelect = (authorId) => {
|
||||
const author = _.find(this.props.items, { id: authorId });
|
||||
|
||||
const ids = this.props.ids;
|
||||
|
||||
ids.forEach((id) => {
|
||||
this.props.updateInteractiveImportItem({
|
||||
id,
|
||||
artist,
|
||||
album: undefined,
|
||||
albumReleaseId: undefined,
|
||||
tracks: [],
|
||||
author,
|
||||
book: undefined,
|
||||
bookReleaseId: undefined,
|
||||
rejections: []
|
||||
});
|
||||
});
|
||||
@@ -64,15 +63,15 @@ class SelectArtistModalContentConnector extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<SelectArtistModalContent
|
||||
<SelectAuthorModalContent
|
||||
{...this.props}
|
||||
onArtistSelect={this.onArtistSelect}
|
||||
onAuthorSelect={this.onAuthorSelect}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
SelectArtistModalContentConnector.propTypes = {
|
||||
SelectAuthorModalContentConnector.propTypes = {
|
||||
ids: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
saveInteractiveImportItem: PropTypes.func.isRequired,
|
||||
@@ -80,4 +79,4 @@ SelectArtistModalContentConnector.propTypes = {
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default connect(createMapStateToProps, mapDispatchToProps)(SelectArtistModalContentConnector);
|
||||
export default connect(createMapStateToProps, mapDispatchToProps)(SelectAuthorModalContentConnector);
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.artist {
|
||||
.author {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid $borderColor;
|
||||
}
|
||||
+9
-9
@@ -1,15 +1,15 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import Link from 'Components/Link/Link';
|
||||
import styles from './SelectArtistRow.css';
|
||||
import styles from './SelectAuthorRow.css';
|
||||
|
||||
class SelectArtistRow extends Component {
|
||||
class SelectAuthorRow extends Component {
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onPress = () => {
|
||||
this.props.onArtistSelect(this.props.id);
|
||||
this.props.onAuthorSelect(this.props.id);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -18,20 +18,20 @@ class SelectArtistRow extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Link
|
||||
className={styles.artist}
|
||||
className={styles.author}
|
||||
component="div"
|
||||
onPress={this.onPress}
|
||||
>
|
||||
{this.props.artistName}
|
||||
{this.props.authorName}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
SelectArtistRow.propTypes = {
|
||||
SelectAuthorRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
artistName: PropTypes.string.isRequired,
|
||||
onArtistSelect: PropTypes.func.isRequired
|
||||
authorName: PropTypes.string.isRequired,
|
||||
onAuthorSelect: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default SelectArtistRow;
|
||||
export default SelectAuthorRow;
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import Modal from 'Components/Modal/Modal';
|
||||
import SelectAlbumModalContentConnector from './SelectAlbumModalContentConnector';
|
||||
import SelectBookModalContentConnector from './SelectBookModalContentConnector';
|
||||
|
||||
class SelectAlbumModal extends Component {
|
||||
class SelectBookModal extends Component {
|
||||
|
||||
//
|
||||
// Render
|
||||
@@ -20,7 +20,7 @@ class SelectAlbumModal extends Component {
|
||||
isOpen={isOpen}
|
||||
onModalClose={onModalClose}
|
||||
>
|
||||
<SelectAlbumModalContentConnector
|
||||
<SelectBookModalContentConnector
|
||||
{...otherProps}
|
||||
onModalClose={onModalClose}
|
||||
/>
|
||||
@@ -29,9 +29,9 @@ class SelectAlbumModal extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
SelectAlbumModal.propTypes = {
|
||||
SelectBookModal.propTypes = {
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default SelectAlbumModal;
|
||||
export default SelectBookModal;
|
||||
+10
-10
@@ -11,8 +11,8 @@ import TableBody from 'Components/Table/TableBody';
|
||||
import Scroller from 'Components/Scroller/Scroller';
|
||||
import TextInput from 'Components/Form/TextInput';
|
||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||
import SelectAlbumRow from './SelectAlbumRow';
|
||||
import styles from './SelectAlbumModalContent.css';
|
||||
import SelectBookRow from './SelectBookRow';
|
||||
import styles from './SelectBookModalContent.css';
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -29,12 +29,12 @@ const columns = [
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
label: 'Album Status',
|
||||
label: 'Book Status',
|
||||
isVisible: true
|
||||
}
|
||||
];
|
||||
|
||||
class SelectAlbumModalContent extends Component {
|
||||
class SelectBookModalContent extends Component {
|
||||
|
||||
//
|
||||
// Lifecycle
|
||||
@@ -60,7 +60,7 @@ class SelectAlbumModalContent extends Component {
|
||||
render() {
|
||||
const {
|
||||
items,
|
||||
onAlbumSelect,
|
||||
onBookSelect,
|
||||
onModalClose,
|
||||
isFetching,
|
||||
...otherProps
|
||||
@@ -102,10 +102,10 @@ class SelectAlbumModalContent extends Component {
|
||||
items.map((item) => {
|
||||
return item.title.toLowerCase().includes(filter) ?
|
||||
(
|
||||
<SelectAlbumRow
|
||||
<SelectBookRow
|
||||
key={item.id}
|
||||
columns={columns}
|
||||
onAlbumSelect={onAlbumSelect}
|
||||
onBookSelect={onBookSelect}
|
||||
{...item}
|
||||
/>
|
||||
) :
|
||||
@@ -128,11 +128,11 @@ class SelectAlbumModalContent extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
SelectAlbumModalContent.propTypes = {
|
||||
SelectBookModalContent.propTypes = {
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
isFetching: PropTypes.bool.isRequired,
|
||||
onAlbumSelect: PropTypes.func.isRequired,
|
||||
onBookSelect: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default SelectAlbumModalContent;
|
||||
export default SelectBookModalContent;
|
||||
+27
-28
@@ -6,31 +6,31 @@ import { createSelector } from 'reselect';
|
||||
import {
|
||||
updateInteractiveImportItem,
|
||||
saveInteractiveImportItem,
|
||||
fetchInteractiveImportAlbums,
|
||||
setInteractiveImportAlbumsSort,
|
||||
clearInteractiveImportAlbums
|
||||
fetchInteractiveImportBooks,
|
||||
setInteractiveImportBooksSort,
|
||||
clearInteractiveImportBooks
|
||||
} from 'Store/Actions/interactiveImportActions';
|
||||
import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector';
|
||||
import SelectAlbumModalContent from './SelectAlbumModalContent';
|
||||
import SelectBookModalContent from './SelectBookModalContent';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createClientSideCollectionSelector('interactiveImport.albums'),
|
||||
(albums) => {
|
||||
return albums;
|
||||
createClientSideCollectionSelector('interactiveImport.books'),
|
||||
(books) => {
|
||||
return books;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const mapDispatchToProps = {
|
||||
fetchInteractiveImportAlbums,
|
||||
setInteractiveImportAlbumsSort,
|
||||
clearInteractiveImportAlbums,
|
||||
fetchInteractiveImportBooks,
|
||||
setInteractiveImportBooksSort,
|
||||
clearInteractiveImportBooks,
|
||||
updateInteractiveImportItem,
|
||||
saveInteractiveImportItem
|
||||
};
|
||||
|
||||
class SelectAlbumModalContentConnector extends Component {
|
||||
class SelectBookModalContentConnector extends Component {
|
||||
|
||||
//
|
||||
// Lifecycle
|
||||
@@ -40,33 +40,32 @@ class SelectAlbumModalContentConnector extends Component {
|
||||
authorId
|
||||
} = this.props;
|
||||
|
||||
this.props.fetchInteractiveImportAlbums({ authorId });
|
||||
this.props.fetchInteractiveImportBooks({ authorId });
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
// This clears the albums for the queue and hides the queue
|
||||
// We'll need another place to store albums for manual import
|
||||
this.props.clearInteractiveImportAlbums();
|
||||
// This clears the books for the queue and hides the queue
|
||||
// We'll need another place to store books for manual import
|
||||
this.props.clearInteractiveImportBooks();
|
||||
}
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onSortPress = (sortKey, sortDirection) => {
|
||||
this.props.setInteractiveImportAlbumsSort({ sortKey, sortDirection });
|
||||
this.props.setInteractiveImportBooksSort({ sortKey, sortDirection });
|
||||
}
|
||||
|
||||
onAlbumSelect = (bookId) => {
|
||||
const album = _.find(this.props.items, { id: bookId });
|
||||
onBookSelect = (bookId) => {
|
||||
const book = _.find(this.props.items, { id: bookId });
|
||||
|
||||
const ids = this.props.ids;
|
||||
|
||||
ids.forEach((id) => {
|
||||
this.props.updateInteractiveImportItem({
|
||||
id,
|
||||
album,
|
||||
albumReleaseId: undefined,
|
||||
tracks: [],
|
||||
book,
|
||||
bookReleaseId: undefined,
|
||||
rejections: []
|
||||
});
|
||||
});
|
||||
@@ -81,25 +80,25 @@ class SelectAlbumModalContentConnector extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<SelectAlbumModalContent
|
||||
<SelectBookModalContent
|
||||
{...this.props}
|
||||
onSortPress={this.onSortPress}
|
||||
onAlbumSelect={this.onAlbumSelect}
|
||||
onBookSelect={this.onBookSelect}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
SelectAlbumModalContentConnector.propTypes = {
|
||||
SelectBookModalContentConnector.propTypes = {
|
||||
ids: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
authorId: PropTypes.number.isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
fetchInteractiveImportAlbums: PropTypes.func.isRequired,
|
||||
setInteractiveImportAlbumsSort: PropTypes.func.isRequired,
|
||||
clearInteractiveImportAlbums: PropTypes.func.isRequired,
|
||||
fetchInteractiveImportBooks: PropTypes.func.isRequired,
|
||||
setInteractiveImportBooksSort: PropTypes.func.isRequired,
|
||||
clearInteractiveImportBooks: PropTypes.func.isRequired,
|
||||
saveInteractiveImportItem: PropTypes.func.isRequired,
|
||||
updateInteractiveImportItem: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default connect(createMapStateToProps, mapDispatchToProps)(SelectAlbumModalContentConnector);
|
||||
export default connect(createMapStateToProps, mapDispatchToProps)(SelectBookModalContentConnector);
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
.albumRow {
|
||||
.bookRow {
|
||||
cursor: pointer;
|
||||
}
|
||||
+22
-22
@@ -5,10 +5,10 @@ import TableRow from 'Components/Table/TableRow';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector';
|
||||
import Label from 'Components/Label';
|
||||
import styles from './SelectAlbumRow.css';
|
||||
import styles from './SelectBookRow.css';
|
||||
|
||||
function getTrackCountKind(monitored, trackFileCount, trackCount) {
|
||||
if (trackFileCount === trackCount && trackCount > 0) {
|
||||
function getBookCountKind(monitored, bookFileCount, bookCount) {
|
||||
if (bookFileCount === bookCount && bookCount > 0) {
|
||||
return kinds.SUCCESS;
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ function getTrackCountKind(monitored, trackFileCount, trackCount) {
|
||||
return kinds.DANGER;
|
||||
}
|
||||
|
||||
class SelectAlbumRow extends Component {
|
||||
class SelectBookRow extends Component {
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onPress = () => {
|
||||
this.props.onAlbumSelect(this.props.id);
|
||||
this.props.onBookSelect(this.props.id);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -35,7 +35,7 @@ class SelectAlbumRow extends Component {
|
||||
const {
|
||||
title,
|
||||
disambiguation,
|
||||
albumType,
|
||||
bookType,
|
||||
releaseDate,
|
||||
statistics,
|
||||
monitored,
|
||||
@@ -43,9 +43,9 @@ class SelectAlbumRow extends Component {
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
trackCount,
|
||||
trackFileCount,
|
||||
totalTrackCount
|
||||
bookCount,
|
||||
bookFileCount,
|
||||
totalBookCount
|
||||
} = statistics;
|
||||
|
||||
const extendedTitle = disambiguation ? `${title} (${disambiguation})` : title;
|
||||
@@ -53,7 +53,7 @@ class SelectAlbumRow extends Component {
|
||||
return (
|
||||
<TableRow
|
||||
onClick={this.onPress}
|
||||
className={styles.albumRow}
|
||||
className={styles.bookRow}
|
||||
>
|
||||
{
|
||||
columns.map((column) => {
|
||||
@@ -74,10 +74,10 @@ class SelectAlbumRow extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'albumType') {
|
||||
if (name === 'bookType') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
{albumType}
|
||||
{bookType}
|
||||
</TableRowCell>
|
||||
);
|
||||
}
|
||||
@@ -97,12 +97,12 @@ class SelectAlbumRow extends Component {
|
||||
key={name}
|
||||
>
|
||||
<Label
|
||||
title={`${totalTrackCount} tracks total. ${trackFileCount} tracks with files.`}
|
||||
kind={getTrackCountKind(monitored, trackFileCount, trackCount)}
|
||||
title={`${totalBookCount} books total. ${bookFileCount} books with files.`}
|
||||
kind={getBookCountKind(monitored, bookFileCount, bookCount)}
|
||||
size={sizes.MEDIUM}
|
||||
>
|
||||
{
|
||||
<span>{trackFileCount} / {trackCount}</span>
|
||||
<span>{bookFileCount} / {bookCount}</span>
|
||||
}
|
||||
</Label>
|
||||
</TableRowCell>
|
||||
@@ -118,23 +118,23 @@ class SelectAlbumRow extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
SelectAlbumRow.propTypes = {
|
||||
SelectBookRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
disambiguation: PropTypes.string.isRequired,
|
||||
albumType: PropTypes.string.isRequired,
|
||||
bookType: PropTypes.string.isRequired,
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
onAlbumSelect: PropTypes.func.isRequired,
|
||||
onBookSelect: PropTypes.func.isRequired,
|
||||
statistics: PropTypes.object.isRequired,
|
||||
monitored: PropTypes.bool.isRequired,
|
||||
columns: PropTypes.arrayOf(PropTypes.object).isRequired
|
||||
};
|
||||
|
||||
SelectAlbumRow.defaultProps = {
|
||||
SelectBookRow.defaultProps = {
|
||||
statistics: {
|
||||
trackCount: 0,
|
||||
trackFileCount: 0
|
||||
bookCount: 0,
|
||||
bookFileCount: 0
|
||||
}
|
||||
};
|
||||
|
||||
export default SelectAlbumRow;
|
||||
export default SelectBookRow;
|
||||
@@ -10,11 +10,11 @@ import ModalBody from 'Components/Modal/ModalBody';
|
||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||
import Alert from 'Components/Alert';
|
||||
|
||||
function formatAlbumFiles(items, album) {
|
||||
function formatBookFiles(items, book) {
|
||||
|
||||
return (
|
||||
<div key={album.id}>
|
||||
<b> {album.title} </b>
|
||||
<div key={book.id}>
|
||||
<b> {book.title} </b>
|
||||
<ul>
|
||||
{
|
||||
_.sortBy(items, 'path').map((item) => {
|
||||
@@ -54,7 +54,7 @@ class ConfirmImportModalContent extends Component {
|
||||
|
||||
render() {
|
||||
const {
|
||||
albums,
|
||||
books,
|
||||
items,
|
||||
onConfirmImportPress,
|
||||
onModalClose,
|
||||
@@ -87,14 +87,14 @@ class ConfirmImportModalContent extends Component {
|
||||
!isFetching && isPopulated &&
|
||||
<div>
|
||||
<Alert>
|
||||
You already have files imported for the albums listed below. If you continue, the existing files <b>will be deleted</b> and the new files imported in their place.
|
||||
You already have files imported for the books listed below. If you continue, the existing files <b>will be deleted</b> and the new files imported in their place.
|
||||
|
||||
To avoid deleting existing files, press 'Cancel' and use the 'Combine with existing files' option.
|
||||
</Alert>
|
||||
|
||||
{ _.chain(items)
|
||||
.groupBy('bookId')
|
||||
.mapValues((value, key) => formatAlbumFiles(value, _.find(albums, (a) => a.id === parseInt(key))))
|
||||
.mapValues((value, key) => formatBookFiles(value, _.find(books, (a) => a.id === parseInt(key))))
|
||||
.values()
|
||||
.value() }
|
||||
</div>
|
||||
@@ -124,7 +124,7 @@ class ConfirmImportModalContent extends Component {
|
||||
}
|
||||
|
||||
ConfirmImportModalContent.propTypes = {
|
||||
albums: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
books: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
isFetching: PropTypes.bool.isRequired,
|
||||
isPopulated: PropTypes.bool.isRequired,
|
||||
|
||||
@@ -2,22 +2,22 @@ import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { fetchInteractiveImportTrackFiles, clearInteractiveImportTrackFiles } from 'Store/Actions/interactiveImportActions';
|
||||
import { fetchInteractiveImportBookFiles, clearInteractiveImportBookFiles } from 'Store/Actions/interactiveImportActions';
|
||||
import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector';
|
||||
import ConfirmImportModalContent from './ConfirmImportModalContent';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createClientSideCollectionSelector('interactiveImport.trackFiles'),
|
||||
(trackFiles) => {
|
||||
return trackFiles;
|
||||
createClientSideCollectionSelector('interactiveImport.bookFiles'),
|
||||
(bookFiles) => {
|
||||
return bookFiles;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const mapDispatchToProps = {
|
||||
fetchInteractiveImportTrackFiles,
|
||||
clearInteractiveImportTrackFiles
|
||||
fetchInteractiveImportBookFiles,
|
||||
clearInteractiveImportBookFiles
|
||||
};
|
||||
|
||||
class ConfirmImportModalContentConnector extends Component {
|
||||
@@ -27,14 +27,14 @@ class ConfirmImportModalContentConnector extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
const {
|
||||
albums
|
||||
books
|
||||
} = this.props;
|
||||
|
||||
this.props.fetchInteractiveImportTrackFiles({ bookId: albums.map((x) => x.id) });
|
||||
this.props.fetchInteractiveImportBookFiles({ bookId: books.map((x) => x.id) });
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.props.clearInteractiveImportTrackFiles();
|
||||
this.props.clearInteractiveImportBookFiles();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -50,10 +50,10 @@ class ConfirmImportModalContentConnector extends Component {
|
||||
}
|
||||
|
||||
ConfirmImportModalContentConnector.propTypes = {
|
||||
albums: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
books: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
fetchInteractiveImportTrackFiles: PropTypes.func.isRequired,
|
||||
clearInteractiveImportTrackFiles: PropTypes.func.isRequired,
|
||||
fetchInteractiveImportBookFiles: PropTypes.func.isRequired,
|
||||
clearInteractiveImportBookFiles: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ class InteractiveImportSelectFolderModalContentConnector extends Component {
|
||||
this.props.addRecentFolder({ folder });
|
||||
|
||||
this.props.executeCommand({
|
||||
name: commandNames.DOWNLOADED_ALBUMS_SCAN,
|
||||
name: commandNames.DOWNLOADED_BOOKS_SCAN,
|
||||
path: folder
|
||||
});
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ import ModalFooter from 'Components/Modal/ModalFooter';
|
||||
import Table from 'Components/Table/Table';
|
||||
import TableBody from 'Components/Table/TableBody';
|
||||
import SelectQualityModal from 'InteractiveImport/Quality/SelectQualityModal';
|
||||
import SelectArtistModal from 'InteractiveImport/Artist/SelectArtistModal';
|
||||
import SelectAlbumModal from 'InteractiveImport/Album/SelectAlbumModal';
|
||||
import SelectAuthorModal from 'InteractiveImport/Author/SelectAuthorModal';
|
||||
import SelectBookModal from 'InteractiveImport/Book/SelectBookModal';
|
||||
import ConfirmImportModal from 'InteractiveImport/Confirmation/ConfirmImportModal';
|
||||
import InteractiveImportRow from './InteractiveImportRow';
|
||||
import styles from './InteractiveImportModalContent.css';
|
||||
@@ -35,13 +35,13 @@ const columns = [
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'artist',
|
||||
label: 'Artist',
|
||||
name: 'author',
|
||||
label: 'Author',
|
||||
isSortable: true,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'album',
|
||||
name: 'book',
|
||||
label: 'Book',
|
||||
isVisible: true
|
||||
},
|
||||
@@ -77,8 +77,8 @@ const importModeOptions = [
|
||||
];
|
||||
|
||||
const SELECT = 'select';
|
||||
const ARTIST = 'artist';
|
||||
const ALBUM = 'album';
|
||||
const AUTHOR = 'author';
|
||||
const BOOK = 'book';
|
||||
const QUALITY = 'quality';
|
||||
|
||||
const replaceExistingFilesOptions = {
|
||||
@@ -101,9 +101,9 @@ class InteractiveImportModalContent extends Component {
|
||||
selectedState: {},
|
||||
invalidRowsSelected: [],
|
||||
selectModalOpen: null,
|
||||
albumsImported: [],
|
||||
booksImported: [],
|
||||
isConfirmImportModalOpen: false,
|
||||
inconsistentAlbumReleases: false
|
||||
inconsistentBookReleases: false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -112,14 +112,14 @@ class InteractiveImportModalContent extends Component {
|
||||
const selectedItems = _.filter(this.props.items, (x) => _.includes(selectedIds, x.id));
|
||||
|
||||
const inconsistent = _(selectedItems)
|
||||
.map((x) => ({ bookId: x.album ? x.album.id : 0, releaseId: x.albumReleaseId }))
|
||||
.map((x) => ({ bookId: x.book ? x.book.id : 0, releaseId: x.bookReleaseId }))
|
||||
.groupBy('bookId')
|
||||
.mapValues((album) => _(album).groupBy((x) => x.releaseId).values().value().length)
|
||||
.mapValues((book) => _(book).groupBy((x) => x.releaseId).values().value().length)
|
||||
.values()
|
||||
.some((x) => x !== undefined && x > 1);
|
||||
|
||||
if (inconsistent !== this.state.inconsistentAlbumReleases) {
|
||||
this.setState({ inconsistentAlbumReleases: inconsistent });
|
||||
if (inconsistent !== this.state.inconsistentBookReleases) {
|
||||
this.setState({ inconsistentBookReleases: inconsistent });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,16 +161,16 @@ class InteractiveImportModalContent extends Component {
|
||||
|
||||
// potentially deleting files
|
||||
const selectedIds = this.getSelectedIds();
|
||||
const albumsImported = _(this.props.items)
|
||||
const booksImported = _(this.props.items)
|
||||
.filter((x) => _.includes(selectedIds, x.id))
|
||||
.keyBy((x) => x.album.id)
|
||||
.map((x) => x.album)
|
||||
.keyBy((x) => x.book.id)
|
||||
.map((x) => x.book)
|
||||
.value();
|
||||
|
||||
console.log(albumsImported);
|
||||
console.log(booksImported);
|
||||
|
||||
this.setState({
|
||||
albumsImported,
|
||||
booksImported,
|
||||
isConfirmImportModalOpen: true
|
||||
});
|
||||
}
|
||||
@@ -205,7 +205,7 @@ class InteractiveImportModalContent extends Component {
|
||||
this.setState({ selectModalOpen: value });
|
||||
}
|
||||
|
||||
onClearTrackMappingPress = () => {
|
||||
onClearBookMappingPress = () => {
|
||||
const selectedIds = this.getSelectedIds();
|
||||
|
||||
selectedIds.forEach((id) => {
|
||||
@@ -216,7 +216,7 @@ class InteractiveImportModalContent extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
onGetTrackMappingPress = () => {
|
||||
onGetBookMappingPress = () => {
|
||||
this.props.saveInteractiveImportItem({ id: this.getSelectedIds() });
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ class InteractiveImportModalContent extends Component {
|
||||
render() {
|
||||
const {
|
||||
downloadId,
|
||||
allowArtistChange,
|
||||
allowAuthorChange,
|
||||
showFilterExistingFiles,
|
||||
showReplaceExistingFiles,
|
||||
showImportMode,
|
||||
@@ -261,9 +261,9 @@ class InteractiveImportModalContent extends Component {
|
||||
selectedState,
|
||||
invalidRowsSelected,
|
||||
selectModalOpen,
|
||||
albumsImported,
|
||||
booksImported,
|
||||
isConfirmImportModalOpen,
|
||||
inconsistentAlbumReleases
|
||||
inconsistentBookReleases
|
||||
} = this.state;
|
||||
|
||||
const selectedIds = this.getSelectedIds();
|
||||
@@ -272,14 +272,14 @@ class InteractiveImportModalContent extends Component {
|
||||
|
||||
const bulkSelectOptions = [
|
||||
{ key: SELECT, value: 'Select...', disabled: true },
|
||||
{ key: ALBUM, value: 'Select Album' },
|
||||
{ key: BOOK, value: 'Select Book' },
|
||||
{ key: QUALITY, value: 'Select Quality' }
|
||||
];
|
||||
|
||||
if (allowArtistChange) {
|
||||
if (allowAuthorChange) {
|
||||
bulkSelectOptions.splice(1, 0, {
|
||||
key: ARTIST,
|
||||
value: 'Select Artist'
|
||||
key: AUTHOR,
|
||||
value: 'Select Author'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ class InteractiveImportModalContent extends Component {
|
||||
isSelected={selectedState[item.id]}
|
||||
isSaving={isSaving}
|
||||
{...item}
|
||||
allowArtistChange={allowArtistChange}
|
||||
allowAuthorChange={allowAuthorChange}
|
||||
onSelectedChange={this.onSelectedChange}
|
||||
onValidRowChange={this.onValidRowChange}
|
||||
/>
|
||||
@@ -448,7 +448,7 @@ class InteractiveImportModalContent extends Component {
|
||||
|
||||
<Button
|
||||
kind={kinds.SUCCESS}
|
||||
isDisabled={!selectedIds.length || !!invalidRowsSelected.length || inconsistentAlbumReleases}
|
||||
isDisabled={!selectedIds.length || !!invalidRowsSelected.length || inconsistentBookReleases}
|
||||
onPress={this.onImportSelectedPress}
|
||||
>
|
||||
Import
|
||||
@@ -456,16 +456,16 @@ class InteractiveImportModalContent extends Component {
|
||||
</div>
|
||||
</ModalFooter>
|
||||
|
||||
<SelectArtistModal
|
||||
isOpen={selectModalOpen === ARTIST}
|
||||
<SelectAuthorModal
|
||||
isOpen={selectModalOpen === AUTHOR}
|
||||
ids={selectedIds}
|
||||
onModalClose={this.onSelectModalClose}
|
||||
/>
|
||||
|
||||
<SelectAlbumModal
|
||||
isOpen={selectModalOpen === ALBUM}
|
||||
<SelectBookModal
|
||||
isOpen={selectModalOpen === BOOK}
|
||||
ids={selectedIds}
|
||||
authorId={selectedItem && selectedItem.artist && selectedItem.artist.id}
|
||||
authorId={selectedItem && selectedItem.author && selectedItem.author.id}
|
||||
onModalClose={this.onSelectModalClose}
|
||||
/>
|
||||
|
||||
@@ -480,7 +480,7 @@ class InteractiveImportModalContent extends Component {
|
||||
|
||||
<ConfirmImportModal
|
||||
isOpen={isConfirmImportModalOpen}
|
||||
albums={albumsImported}
|
||||
books={booksImported}
|
||||
onModalClose={this.onConfirmImportModalClose}
|
||||
onConfirmImportPress={this.onConfirmImportPress}
|
||||
/>
|
||||
@@ -492,7 +492,7 @@ class InteractiveImportModalContent extends Component {
|
||||
|
||||
InteractiveImportModalContent.propTypes = {
|
||||
downloadId: PropTypes.string,
|
||||
allowArtistChange: PropTypes.bool.isRequired,
|
||||
allowAuthorChange: PropTypes.bool.isRequired,
|
||||
showImportMode: PropTypes.bool.isRequired,
|
||||
showFilterExistingFiles: PropTypes.bool.isRequired,
|
||||
showReplaceExistingFiles: PropTypes.bool.isRequired,
|
||||
@@ -520,7 +520,7 @@ InteractiveImportModalContent.propTypes = {
|
||||
};
|
||||
|
||||
InteractiveImportModalContent.defaultProps = {
|
||||
allowArtistChange: true,
|
||||
allowAuthorChange: true,
|
||||
showFilterExistingFiles: false,
|
||||
showReplaceExistingFiles: false,
|
||||
showImportMode: true,
|
||||
|
||||
+8
-8
@@ -122,19 +122,19 @@ class InteractiveImportModalContentConnector extends Component {
|
||||
|
||||
if (isSelected) {
|
||||
const {
|
||||
artist,
|
||||
album,
|
||||
author,
|
||||
book,
|
||||
quality,
|
||||
disableReleaseSwitching
|
||||
} = item;
|
||||
|
||||
if (!artist) {
|
||||
this.setState({ interactiveImportErrorMessage: 'Artist must be chosen for each selected file' });
|
||||
if (!author) {
|
||||
this.setState({ interactiveImportErrorMessage: 'Author must be chosen for each selected file' });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!album) {
|
||||
this.setState({ interactiveImportErrorMessage: 'Album must be chosen for each selected file' });
|
||||
if (!book) {
|
||||
this.setState({ interactiveImportErrorMessage: 'Book must be chosen for each selected file' });
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -145,8 +145,8 @@ class InteractiveImportModalContentConnector extends Component {
|
||||
|
||||
files.push({
|
||||
path: item.path,
|
||||
authorId: artist.id,
|
||||
bookId: album.id,
|
||||
authorId: author.id,
|
||||
bookId: book.id,
|
||||
quality,
|
||||
downloadId: this.props.downloadId,
|
||||
disableReleaseSwitching
|
||||
|
||||
@@ -9,9 +9,9 @@ import TableRowCellButton from 'Components/Table/Cells/TableRowCellButton';
|
||||
import TableSelectCell from 'Components/Table/Cells/TableSelectCell';
|
||||
import Popover from 'Components/Tooltip/Popover';
|
||||
import Tooltip from 'Components/Tooltip/Tooltip';
|
||||
import TrackQuality from 'Album/TrackQuality';
|
||||
import SelectArtistModal from 'InteractiveImport/Artist/SelectArtistModal';
|
||||
import SelectAlbumModal from 'InteractiveImport/Album/SelectAlbumModal';
|
||||
import BookQuality from 'Book/BookQuality';
|
||||
import SelectAuthorModal from 'InteractiveImport/Author/SelectAuthorModal';
|
||||
import SelectBookModal from 'InteractiveImport/Book/SelectBookModal';
|
||||
import SelectQualityModal from 'InteractiveImport/Quality/SelectQualityModal';
|
||||
import InteractiveImportRowCellPlaceholder from './InteractiveImportRowCellPlaceholder';
|
||||
import styles from './InteractiveImportRow.css';
|
||||
@@ -25,8 +25,8 @@ class InteractiveImportRow extends Component {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
isSelectArtistModalOpen: false,
|
||||
isSelectAlbumModalOpen: false,
|
||||
isSelectAuthorModalOpen: false,
|
||||
isSelectBookModalOpen: false,
|
||||
isSelectQualityModalOpen: false
|
||||
};
|
||||
}
|
||||
@@ -34,14 +34,14 @@ class InteractiveImportRow extends Component {
|
||||
componentDidMount() {
|
||||
const {
|
||||
id,
|
||||
artist,
|
||||
album,
|
||||
author,
|
||||
book,
|
||||
quality
|
||||
} = this.props;
|
||||
|
||||
if (
|
||||
artist &&
|
||||
album != null &&
|
||||
author &&
|
||||
book != null &&
|
||||
quality
|
||||
) {
|
||||
this.props.onSelectedChange({ id, value: true });
|
||||
@@ -51,16 +51,16 @@ class InteractiveImportRow extends Component {
|
||||
componentDidUpdate(prevProps) {
|
||||
const {
|
||||
id,
|
||||
artist,
|
||||
album,
|
||||
author,
|
||||
book,
|
||||
quality,
|
||||
isSelected,
|
||||
onValidRowChange
|
||||
} = this.props;
|
||||
|
||||
if (
|
||||
prevProps.artist === artist &&
|
||||
prevProps.album === album &&
|
||||
prevProps.author === author &&
|
||||
prevProps.book === book &&
|
||||
prevProps.quality === quality &&
|
||||
prevProps.isSelected === isSelected
|
||||
) {
|
||||
@@ -68,8 +68,8 @@ class InteractiveImportRow extends Component {
|
||||
}
|
||||
|
||||
const isValid = !!(
|
||||
artist &&
|
||||
album &&
|
||||
author &&
|
||||
book &&
|
||||
quality
|
||||
);
|
||||
|
||||
@@ -97,25 +97,25 @@ class InteractiveImportRow extends Component {
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onSelectArtistPress = () => {
|
||||
this.setState({ isSelectArtistModalOpen: true });
|
||||
onSelectAuthorPress = () => {
|
||||
this.setState({ isSelectAuthorModalOpen: true });
|
||||
}
|
||||
|
||||
onSelectAlbumPress = () => {
|
||||
this.setState({ isSelectAlbumModalOpen: true });
|
||||
onSelectBookPress = () => {
|
||||
this.setState({ isSelectBookModalOpen: true });
|
||||
}
|
||||
|
||||
onSelectQualityPress = () => {
|
||||
this.setState({ isSelectQualityModalOpen: true });
|
||||
}
|
||||
|
||||
onSelectArtistModalClose = (changed) => {
|
||||
this.setState({ isSelectArtistModalOpen: false });
|
||||
onSelectAuthorModalClose = (changed) => {
|
||||
this.setState({ isSelectAuthorModalOpen: false });
|
||||
this.selectRowAfterChange(changed);
|
||||
}
|
||||
|
||||
onSelectAlbumModalClose = (changed) => {
|
||||
this.setState({ isSelectAlbumModalOpen: false });
|
||||
onSelectBookModalClose = (changed) => {
|
||||
this.setState({ isSelectBookModalOpen: false });
|
||||
this.selectRowAfterChange(changed);
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ class InteractiveImportRow extends Component {
|
||||
render() {
|
||||
const {
|
||||
id,
|
||||
allowArtistChange,
|
||||
allowAuthorChange,
|
||||
path,
|
||||
artist,
|
||||
album,
|
||||
author,
|
||||
book,
|
||||
quality,
|
||||
size,
|
||||
rejections,
|
||||
@@ -143,19 +143,19 @@ class InteractiveImportRow extends Component {
|
||||
} = this.props;
|
||||
|
||||
const {
|
||||
isSelectArtistModalOpen,
|
||||
isSelectAlbumModalOpen,
|
||||
isSelectAuthorModalOpen,
|
||||
isSelectBookModalOpen,
|
||||
isSelectQualityModalOpen
|
||||
} = this.state;
|
||||
|
||||
const artistName = artist ? artist.artistName : '';
|
||||
let albumTitle = '';
|
||||
if (album) {
|
||||
albumTitle = album.disambiguation ? `${album.title} (${album.disambiguation})` : album.title;
|
||||
const authorName = author ? author.authorName : '';
|
||||
let bookTitle = '';
|
||||
if (book) {
|
||||
bookTitle = book.disambiguation ? `${book.title} (${book.disambiguation})` : book.title;
|
||||
}
|
||||
|
||||
const showArtistPlaceholder = isSelected && !artist;
|
||||
const showAlbumNumberPlaceholder = isSelected && !!artist && !album;
|
||||
const showAuthorPlaceholder = isSelected && !author;
|
||||
const showBookNumberPlaceholder = isSelected && !!author && !book;
|
||||
const showQualityPlaceholder = isSelected && !quality;
|
||||
|
||||
const pathCellContents = (
|
||||
@@ -190,22 +190,22 @@ class InteractiveImportRow extends Component {
|
||||
</TableRowCell>
|
||||
|
||||
<TableRowCellButton
|
||||
isDisabled={!allowArtistChange}
|
||||
title={allowArtistChange ? 'Click to change artist' : undefined}
|
||||
onPress={this.onSelectArtistPress}
|
||||
isDisabled={!allowAuthorChange}
|
||||
title={allowAuthorChange ? 'Click to change author' : undefined}
|
||||
onPress={this.onSelectAuthorPress}
|
||||
>
|
||||
{
|
||||
showArtistPlaceholder ? <InteractiveImportRowCellPlaceholder /> : artistName
|
||||
showAuthorPlaceholder ? <InteractiveImportRowCellPlaceholder /> : authorName
|
||||
}
|
||||
</TableRowCellButton>
|
||||
|
||||
<TableRowCellButton
|
||||
isDisabled={!artist}
|
||||
title={artist ? 'Click to change album' : undefined}
|
||||
onPress={this.onSelectAlbumPress}
|
||||
isDisabled={!author}
|
||||
title={author ? 'Click to change book' : undefined}
|
||||
onPress={this.onSelectBookPress}
|
||||
>
|
||||
{
|
||||
showAlbumNumberPlaceholder ? <InteractiveImportRowCellPlaceholder /> : albumTitle
|
||||
showBookNumberPlaceholder ? <InteractiveImportRowCellPlaceholder /> : bookTitle
|
||||
}
|
||||
</TableRowCellButton>
|
||||
|
||||
@@ -221,7 +221,7 @@ class InteractiveImportRow extends Component {
|
||||
|
||||
{
|
||||
!showQualityPlaceholder && !!quality &&
|
||||
<TrackQuality
|
||||
<BookQuality
|
||||
className={styles.label}
|
||||
quality={quality}
|
||||
/>
|
||||
@@ -262,17 +262,17 @@ class InteractiveImportRow extends Component {
|
||||
}
|
||||
</TableRowCell>
|
||||
|
||||
<SelectArtistModal
|
||||
isOpen={isSelectArtistModalOpen}
|
||||
<SelectAuthorModal
|
||||
isOpen={isSelectAuthorModalOpen}
|
||||
ids={[id]}
|
||||
onModalClose={this.onSelectArtistModalClose}
|
||||
onModalClose={this.onSelectAuthorModalClose}
|
||||
/>
|
||||
|
||||
<SelectAlbumModal
|
||||
isOpen={isSelectAlbumModalOpen}
|
||||
<SelectBookModal
|
||||
isOpen={isSelectBookModalOpen}
|
||||
ids={[id]}
|
||||
authorId={artist && artist.id}
|
||||
onModalClose={this.onSelectAlbumModalClose}
|
||||
authorId={author && author.id}
|
||||
onModalClose={this.onSelectBookModalClose}
|
||||
/>
|
||||
|
||||
<SelectQualityModal
|
||||
@@ -291,10 +291,10 @@ class InteractiveImportRow extends Component {
|
||||
|
||||
InteractiveImportRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
allowArtistChange: PropTypes.bool.isRequired,
|
||||
allowAuthorChange: PropTypes.bool.isRequired,
|
||||
path: PropTypes.string.isRequired,
|
||||
artist: PropTypes.object,
|
||||
album: PropTypes.object,
|
||||
author: PropTypes.object,
|
||||
book: PropTypes.object,
|
||||
quality: PropTypes.object,
|
||||
size: PropTypes.number.isRequired,
|
||||
rejections: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
|
||||
Reference in New Issue
Block a user