diff --git a/frontend/src/Author/Details/AuthorDetails.js b/frontend/src/Author/Details/AuthorDetails.js index c9c8946b5..9a9731b33 100644 --- a/frontend/src/Author/Details/AuthorDetails.js +++ b/frontend/src/Author/Details/AuthorDetails.js @@ -258,12 +258,12 @@ class AuthorDetails extends Component { onPress={this.onOrganizePress} /> - {/* */} + - - Retag Selected Author - + // + // Lifecycle - - - Tip: To preview the tags that will be written... select "Cancel" then click any author name and use the - - + constructor(props, context) { + super(props, context); -
- Are you sure you want to re-tag all files in the {authorNames.length} selected author? -
-
    - { - authorNames.map((authorName) => { - return ( -
  • - {authorName} -
  • - ); - }) - } -
-
+ this.state = { + updateCovers: false, + embedMetadata: false + }; + } - - + // + // Listeners - - - - ); + onCheckInputChange = ({ name, value }) => { + this.setState({ [name]: value }); + } + + onRetagAuthorPress = () => { + this.props.onRetagAuthorPress(this.state.updateCovers, this.state.embedMetadata); + } + + // + // Render + + render() { + const { + authorNames, + onModalClose + } = this.props; + + return ( + + + Retag Selected Author + + + + + Tip: To preview the tags that will be written... select "Cancel" then click any author name and use the + + + +
+ Are you sure you want to re-tag all files in the {authorNames.length} selected author? +
+
    + { + authorNames.map((authorName) => { + return ( +
  • + {authorName} +
  • + ); + }) + } +
+
+ + + + + + + + + + +
+ ); + } } RetagAuthorModalContent.propTypes = { diff --git a/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContentConnector.js b/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContentConnector.js index 2d00dde27..9862dd558 100644 --- a/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContentConnector.js +++ b/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContentConnector.js @@ -36,10 +36,12 @@ class RetagAuthorModalContentConnector extends Component { // // Listeners - onRetagAuthorPress = () => { + onRetagAuthorPress = (updateCovers, embedMetadata) => { this.props.executeCommand({ name: commandNames.RETAG_AUTHOR, - authorIds: this.props.authorIds + authorIds: this.props.authorIds, + updateCovers, + embedMetadata }); this.props.onModalClose(true); diff --git a/frontend/src/Book/Details/BookDetails.js b/frontend/src/Book/Details/BookDetails.js index a8b9887cd..03b021d32 100644 --- a/frontend/src/Book/Details/BookDetails.js +++ b/frontend/src/Book/Details/BookDetails.js @@ -7,7 +7,6 @@ import TextTruncate from 'react-text-truncate'; import AuthorHistoryTable from 'Author/History/AuthorHistoryTable'; import BookCover from 'Book/BookCover'; import DeleteBookModal from 'Book/Delete/DeleteBookModal'; -// import RetagPreviewModalConnector from 'Retag/RetagPreviewModalConnector'; import EditBookModalConnector from 'Book/Edit/EditBookModalConnector'; import BookFileEditorTable from 'BookFile/Editor/BookFileEditorTable'; import HeartRating from 'Components/HeartRating'; @@ -27,6 +26,7 @@ import { icons, kinds, sizes, tooltipPositions } from 'Helpers/Props'; import InteractiveSearchFilterMenuConnector from 'InteractiveSearch/InteractiveSearchFilterMenuConnector'; import InteractiveSearchTable from 'InteractiveSearch/InteractiveSearchTable'; import OrganizePreviewModalConnector from 'Organize/OrganizePreviewModalConnector'; +import RetagPreviewModalConnector from 'Retag/RetagPreviewModalConnector'; import fonts from 'Styles/Variables/fonts'; import formatBytes from 'Utilities/Number/formatBytes'; import stripHtml from 'Utilities/String/stripHtml'; @@ -138,7 +138,7 @@ class BookDetails extends Component { const { isOrganizeModalOpen, - // isRetagModalOpen, + isRetagModalOpen, isEditBookModalOpen, isDeleteBookModalOpen, selectedTabIndex @@ -445,12 +445,12 @@ class BookDetails extends Component { onModalClose={this.onOrganizeModalClose} /> - {/* */} + { + this.setState({ [name]: value }); + } + onRetagPress = () => { - this.props.onRetagPress(this.getSelectedIds()); + this.props.onRetagPress(this.getSelectedIds(), this.state.updateCovers, this.state.embedMetadata); } // @@ -110,12 +115,6 @@ class RetagPreviewModalContent extends Component { { !isFetching && isPopulated && !!items.length &&
- -
- MusicBrainz identifiers will also be added to the files; these are not shown below. -
-
-
{ items.map((item) => { @@ -148,6 +147,34 @@ class RetagPreviewModalContent extends Component { /> } + + + +