From ee43ccf6205bca13d9672fe8accfb1420db8433d Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 15 May 2020 23:32:52 -0400 Subject: [PATCH] Renames in Frontend --- .../src/Activity/Blacklist/BlacklistRow.js | 18 +- .../Blacklist/BlacklistRowConnector.js | 8 +- .../History/Details/HistoryDetails.js | 10 +- .../History/Details/HistoryDetailsModal.js | 20 +- frontend/src/Activity/History/History.js | 24 +- .../src/Activity/History/HistoryConnector.js | 42 ++-- .../Activity/History/HistoryEventTypeCell.js | 42 ++-- frontend/src/Activity/History/HistoryRow.js | 32 +-- .../Activity/History/HistoryRowConnector.js | 17 +- frontend/src/Activity/Queue/Queue.js | 22 +- frontend/src/Activity/Queue/QueueConnector.js | 32 +-- frontend/src/Activity/Queue/QueueDetails.js | 2 +- frontend/src/Activity/Queue/QueueOptions.js | 20 +- frontend/src/Activity/Queue/QueueRow.js | 40 ++-- .../src/Activity/Queue/QueueRowConnector.js | 16 +- .../Queue/Status/QueueStatusConnector.js | 10 +- .../AuthorMetadataProfilePopoverContent.js} | 4 +- .../AuthorMonitoringOptionsPopoverContent.js} | 4 +- .../src/AlbumStudio/AlbumStudioConnector.js | 116 ---------- .../AlbumStudio/AlbumStudioRowConnector.js | 94 -------- frontend/src/App/AppRoutes.js | 26 +-- .../src/Artist/Details/AlbumRowConnector.js | 20 -- .../src/Artist/Editor/ArtistEditorRow.css | 5 - .../src/Artist/History/ArtistHistoryTable.js | 21 -- .../Index/Table/ArtistIndexActionsCell.js | 102 --------- .../Index/Table/ArtistIndexHeaderConnector.js | 13 -- .../AuthorBanner.js} | 12 +- .../ArtistImage.js => Author/AuthorImage.js} | 8 +- .../AuthorNameLink.js} | 10 +- .../AuthorPoster.js} | 12 +- .../Delete/DeleteAuthorModal.js} | 10 +- .../Delete/DeleteAuthorModalContent.css} | 0 .../Delete/DeleteAuthorModalContent.js} | 42 ++-- .../DeleteAuthorModalContentConnector.js} | 26 +-- .../Details/AuthorAlternateTitles.css} | 0 .../Details/AuthorAlternateTitles.js} | 8 +- .../Details/AuthorDetails.css} | 4 +- .../Details/AuthorDetails.js} | 192 ++++++++-------- .../Details/AuthorDetailsConnector.js} | 216 +++++++++--------- .../Details/AuthorDetailsLinks.css} | 0 .../Details/AuthorDetailsLinks.js} | 8 +- .../Details/AuthorDetailsPageConnector.js} | 22 +- .../Details/AuthorDetailsSeason.css} | 12 +- .../Details/AuthorDetailsSeason.js} | 30 +-- .../Details/AuthorDetailsSeasonConnector.js} | 58 ++--- .../Details/AuthorDetailsSeries.css | 12 +- .../Details/AuthorDetailsSeries.js | 34 +-- .../Details/AuthorDetailsSeriesConnector.js | 32 +-- .../Details/AuthorTags.css} | 0 .../Details/AuthorTags.js} | 6 +- .../Details/AuthorTagsConnector.js} | 12 +- .../Details/BookRow.css} | 0 .../AlbumRow.js => Author/Details/BookRow.js} | 64 +++--- .../src/Author/Details/BookRowConnector.js | 20 ++ .../Edit/EditAuthorModal.js} | 10 +- .../Edit/EditAuthorModalConnector.js} | 12 +- .../Edit/EditAuthorModalContent.css} | 0 .../Edit/EditAuthorModalContent.js} | 36 +-- .../Edit/EditAuthorModalContentConnector.js} | 53 +++-- .../Editor/AudioTags/RetagAuthorModal.js} | 10 +- .../AudioTags/RetagAuthorModalContent.css} | 0 .../AudioTags/RetagAuthorModalContent.js} | 30 +-- .../RetagAuthorModalContentConnector.js} | 30 +-- .../Editor/AuthorEditor.js} | 78 +++---- .../Editor/AuthorEditorConnector.js} | 46 ++-- .../AuthorEditorFilterModalConnector.js} | 10 +- .../Editor/AuthorEditorFooter.css} | 2 +- .../Editor/AuthorEditorFooter.js} | 107 ++++----- .../Editor/AuthorEditorFooterLabel.css} | 0 .../Editor/AuthorEditorFooterLabel.js} | 10 +- .../Editor/AuthorEditorRow.js} | 33 ++- .../Editor/AuthorEditorRowConnector.js} | 10 +- .../Editor/Delete/DeleteAuthorModal.js} | 10 +- .../Delete/DeleteAuthorModalContent.css} | 0 .../Delete/DeleteAuthorModalContent.js} | 30 +-- .../DeleteAuthorModalContentConnector.js} | 24 +- .../Editor/Organize/OrganizeAuthorModal.js} | 10 +- .../Organize/OrganizeAuthorModalContent.css} | 0 .../Organize/OrganizeAuthorModalContent.js} | 30 +-- .../OrganizeAuthorModalContentConnector.js} | 30 +-- .../Editor/Tags/TagsModal.js | 0 .../Editor/Tags/TagsModalContent.css | 0 .../Editor/Tags/TagsModalContent.js | 10 +- .../Editor/Tags/TagsModalContentConnector.js | 12 +- .../History/AuthorHistoryContentConnector.js} | 32 +-- .../History/AuthorHistoryModal.js} | 14 +- .../History/AuthorHistoryModalContent.js} | 10 +- .../History/AuthorHistoryRow.css} | 0 .../History/AuthorHistoryRow.js} | 42 ++-- .../History/AuthorHistoryRowConnector.js} | 18 +- .../src/Author/History/AuthorHistoryTable.js | 21 ++ .../History/AuthorHistoryTableContent.js} | 18 +- .../Index/AuthorIndex.css} | 0 .../Index/AuthorIndex.js} | 90 ++++---- .../Index/AuthorIndexConnector.js} | 49 ++-- .../Index/AuthorIndexFilterModalConnector.js} | 10 +- .../Index/AuthorIndexFooter.css} | 0 .../Index/AuthorIndexFooter.js} | 32 +-- .../Index/AuthorIndexFooterConnector.js} | 20 +- .../Index/AuthorIndexItemConnector.js} | 72 +++--- .../Index/Banners/AuthorIndexBanner.css} | 0 .../Index/Banners/AuthorIndexBanner.js} | 120 +++++----- .../Index/Banners/AuthorIndexBannerInfo.css} | 0 .../Index/Banners/AuthorIndexBannerInfo.js} | 26 +-- .../Index/Banners/AuthorIndexBanners.css} | 0 .../Index/Banners/AuthorIndexBanners.js} | 32 +-- .../Banners/AuthorIndexBannersConnector.js} | 6 +- .../Options/AuthorIndexBannerOptionsModal.js} | 10 +- .../AuthorIndexBannerOptionsModalContent.js} | 8 +- ...ndexBannerOptionsModalContentConnector.js} | 14 +- .../Index/Menus/AuthorIndexFilterMenu.js} | 12 +- .../Index/Menus/AuthorIndexSortMenu.js} | 26 +-- .../Index/Menus/AuthorIndexViewMenu.js} | 6 +- .../Index/Overview/AuthorIndexOverview.css} | 0 .../Index/Overview/AuthorIndexOverview.js} | 126 +++++----- .../Overview/AuthorIndexOverviewInfo.css} | 0 .../Overview/AuthorIndexOverviewInfo.js} | 62 ++--- .../Overview/AuthorIndexOverviewInfoRow.css} | 2 +- .../Overview/AuthorIndexOverviewInfoRow.js} | 8 +- .../Index/Overview/AuthorIndexOverviews.css} | 0 .../Index/Overview/AuthorIndexOverviews.js} | 32 +-- .../AuthorIndexOverviewsConnector.js} | 6 +- .../AuthorIndexOverviewOptionsModal.js} | 10 +- ...AuthorIndexOverviewOptionsModalContent.js} | 42 ++-- ...exOverviewOptionsModalContentConnector.js} | 14 +- .../Index/Posters/AuthorIndexPoster.css} | 0 .../Index/Posters/AuthorIndexPoster.js} | 124 +++++----- .../Index/Posters/AuthorIndexPosterInfo.css} | 0 .../Index/Posters/AuthorIndexPosterInfo.js} | 26 +-- .../Index/Posters/AuthorIndexPosters.css} | 0 .../Index/Posters/AuthorIndexPosters.js} | 32 +-- .../Posters/AuthorIndexPostersConnector.js} | 6 +- .../Options/AuthorIndexPosterOptionsModal.js} | 10 +- .../AuthorIndexPosterOptionsModalContent.js} | 8 +- ...ndexPosterOptionsModalContentConnector.js} | 14 +- .../ProgressBar/AuthorIndexProgressBar.css} | 0 .../ProgressBar/AuthorIndexProgressBar.js} | 28 +-- .../Index/Table/AuthorIndexActionsCell.js | 102 +++++++++ .../Index/Table/AuthorIndexHeader.css} | 14 +- .../Index/Table/AuthorIndexHeader.js} | 12 +- .../Index/Table/AuthorIndexHeaderConnector.js | 13 ++ .../Index/Table/AuthorIndexRow.css} | 20 +- .../Index/Table/AuthorIndexRow.js} | 192 +++++++--------- .../Index/Table/AuthorIndexTable.css} | 0 .../Index/Table/AuthorIndexTable.js} | 30 +-- .../Index/Table/AuthorIndexTableConnector.js} | 12 +- .../Index/Table/AuthorIndexTableOptions.js} | 6 +- .../AuthorIndexTableOptionsConnector.js} | 6 +- .../Index/Table/AuthorStatusCell.css} | 0 .../Index/Table/AuthorStatusCell.js} | 20 +- .../Index/Table/hasGrowableColumns.js | 0 .../MoveAuthor/MoveAuthorModal.css} | 0 .../MoveAuthor/MoveAuthorModal.js} | 18 +- .../NoArtist.css => Author/NoAuthor.css} | 0 .../NoArtist.js => Author/NoAuthor.js} | 8 +- .../AlbumCover.js => Book/BookCover.js} | 12 +- .../TrackQuality.js => Book/BookQuality.js} | 8 +- .../BookSearchCell.css} | 2 +- .../BookSearchCell.js} | 20 +- .../BookSearchCellConnector.js} | 20 +- .../BookTitleLink.css} | 0 .../BookTitleLink.js} | 6 +- .../Delete/DeleteBookModal.js} | 10 +- .../Delete/DeleteBookModalContent.css} | 0 .../Delete/DeleteBookModalContent.js} | 32 +-- .../DeleteBookModalContentConnector.js} | 26 +-- .../Details/BookDetails.css} | 8 +- .../Details/BookDetails.js} | 114 ++++----- .../Details/BookDetailsConnector.js} | 114 ++++----- .../Details/BookDetailsLinks.css} | 0 .../Details/BookDetailsLinks.js} | 8 +- .../Details/BookDetailsPageConnector.js} | 42 ++-- .../src/{Album => Book}/EpisodeNumber.css | 0 frontend/src/{Album => Book}/EpisodeNumber.js | 14 +- .../src/{Album => Book}/EpisodeStatus.css | 0 frontend/src/{Album => Book}/EpisodeStatus.js | 30 +-- .../{Album => Book}/EpisodeStatusConnector.js | 16 +- frontend/src/{Album => Book}/SceneInfo.css | 0 frontend/src/{Album => Book}/SceneInfo.js | 6 +- .../Search/BookInteractiveSearchModal.js} | 16 +- .../BookInteractiveSearchModalConnector.js} | 4 +- .../BookInteractiveSearchModalContent.js} | 14 +- .../{Album => Book}/SeasonEpisodeNumber.js | 8 +- .../albumEntities.js => Book/bookEntities.js} | 6 +- .../Editor/BookFileEditorRow.js} | 10 +- .../BookFile/Editor/BookFileEditorTable.js | 16 ++ .../Editor/BookFileEditorTableContent.css} | 0 .../Editor/BookFileEditorTableContent.js} | 22 +- .../BookFileEditorTableContentConnector.js} | 59 ++--- .../ExpandingFileDetails.css | 0 .../ExpandingFileDetails.js | 0 .../{TrackFile => BookFile}/FileDetails.css | 0 .../{TrackFile => BookFile}/FileDetails.js | 28 +-- .../FileDetailsConnector.js | 14 +- .../FileDetailsModal.js | 0 .../src/{TrackFile => BookFile}/MediaInfo.js | 0 .../MediaInfoConnector.js | 10 +- .../{TrackFile => BookFile}/mediaInfoTypes.js | 0 .../Bookshelf.css} | 0 .../AlbumStudio.js => Bookshelf/Bookshelf.js} | 58 ++--- .../BookshelfBook.css} | 8 +- .../BookshelfBook.js} | 42 ++-- frontend/src/Bookshelf/BookshelfConnector.js | 116 ++++++++++ .../BookshelfFilterModalConnector.js} | 10 +- .../BookshelfFooter.css} | 0 .../BookshelfFooter.js} | 12 +- .../BookshelfRow.css} | 2 +- .../BookshelfRow.js} | 50 ++-- .../src/Bookshelf/BookshelfRowConnector.js | 94 ++++++++ .../BookshelfTableHeader.css} | 2 +- .../BookshelfTableHeader.js} | 8 +- frontend/src/Calendar/Agenda/AgendaEvent.css | 12 +- frontend/src/Calendar/Agenda/AgendaEvent.js | 26 +-- .../Calendar/Agenda/AgendaEventConnector.js | 8 +- frontend/src/Calendar/CalendarConnector.js | 18 +- frontend/src/Calendar/CalendarPage.js | 22 +- .../src/Calendar/CalendarPageConnector.js | 24 +- .../src/Calendar/Events/CalendarEvent.css | 8 +- frontend/src/Calendar/Events/CalendarEvent.js | 26 +-- .../Calendar/Events/CalendarEventConnector.js | 8 +- .../Events/CalendarEventQueueDetails.js | 2 +- .../src/Calendar/Header/CalendarHeader.js | 2 +- frontend/src/Calendar/Legend/Legend.js | 12 +- .../Options/CalendarOptionsModalContent.js | 12 +- frontend/src/Calendar/getStatusStyle.js | 6 +- .../Calendar/iCal/CalendarLinkModalContent.js | 4 +- frontend/src/Commands/commandNames.js | 18 +- ...s => AuthorStatusFilterBuilderRowValue.js} | 4 +- .../Filter/Builder/FilterBuilderRow.js | 6 +- .../Form/AlbumReleaseSelectInputConnector.js | 70 ------ .../Form/BookReleaseSelectInputConnector.js | 70 ++++++ .../src/Components/Form/FormInputGroup.js | 12 +- ...ectInput.js => MonitorBooksSelectInput.js} | 10 +- .../Components/Form/SeriesTypeSelectInput.js | 4 +- .../src/Components/Loading/LoadingMessage.js | 2 +- .../src/Components/MonitorToggleButton.js | 2 +- frontend/src/Components/Page/ErrorPage.js | 8 +- ...tSearchInput.css => AuthorSearchInput.css} | 6 +- ...istSearchInput.js => AuthorSearchInput.js} | 48 ++-- ...ector.js => AuthorSearchInputConnector.js} | 30 +-- ...earchResult.css => AuthorSearchResult.css} | 0 ...tSearchResult.js => AuthorSearchResult.js} | 18 +- .../src/Components/Page/Header/PageHeader.js | 4 +- .../src/Components/Page/Header/fuse.worker.js | 16 +- frontend/src/Components/Page/PageConnector.js | 12 +- .../Page/Sidebar/Messages/Message.js | 6 +- .../Components/Page/Sidebar/PageSidebar.js | 8 +- frontend/src/Components/SignalRConnector.js | 34 +-- frontend/src/Components/keyboardShortcuts.js | 2 +- .../Helpers/Props/filterBuilderValueTypes.js | 2 +- frontend/src/Helpers/Props/icons.js | 8 +- frontend/src/Helpers/Props/inputTypes.js | 10 +- .../SelectAuthorModal.js} | 10 +- .../SelectAuthorModalContent.css} | 0 .../SelectAuthorModalContent.js} | 26 +-- .../SelectAuthorModalContentConnector.js} | 27 ++- .../SelectAuthorRow.css} | 2 +- .../SelectAuthorRow.js} | 18 +- .../SelectBookModal.js} | 10 +- .../SelectBookModalContent.css} | 0 .../SelectBookModalContent.js} | 20 +- .../SelectBookModalContentConnector.js} | 55 +++-- .../SelectBookRow.css} | 2 +- .../SelectBookRow.js} | 44 ++-- .../Confirmation/ConfirmImportModalContent.js | 14 +- .../ConfirmImportModalContentConnector.js | 24 +- ...ImportSelectFolderModalContentConnector.js | 2 +- .../InteractiveImportModalContent.js | 74 +++--- .../InteractiveImportModalContentConnector.js | 16 +- .../Interactive/InteractiveImportRow.js | 106 ++++----- .../InteractiveSearch/InteractiveSearch.js | 2 +- .../InteractiveSearchConnector.js | 6 +- .../InteractiveSearchFilterMenuConnector.js | 6 +- .../InteractiveSearchFilterModalConnector.js | 8 +- .../InteractiveSearch/InteractiveSearchRow.js | 6 +- .../Organize/OrganizePreviewModalContent.js | 6 +- .../OrganizePreviewModalContentConnector.js | 8 +- .../src/Retag/RetagPreviewModalContent.js | 6 +- .../RetagPreviewModalContentConnector.js | 8 +- frontend/src/Search/AddNewItem.js | 24 +- .../Author/AddNewAuthorModal.js} | 10 +- .../AddNewAuthorModalContent.css} | 8 +- .../AddNewAuthorModalContent.js} | 54 ++--- .../AddNewAuthorModalContentConnector.js} | 26 +-- .../AddNewAuthorSearchResult.css} | 0 .../AddNewAuthorSearchResult.js} | 66 +++--- .../AddNewAuthorSearchResultConnector.js} | 12 +- .../AddNewBookModal.js} | 10 +- .../AddNewBookModalContent.css} | 16 +- .../AddNewBookModalContent.js} | 68 +++--- .../AddNewBookModalContentConnector.js} | 32 +-- .../AddNewBookSearchResult.css} | 2 +- .../AddNewBookSearchResult.js} | 68 +++--- .../AddNewBookSearchResultConnector.js} | 4 +- ...tionsForm.css => AddAuthorOptionsForm.css} | 0 ...OptionsForm.js => AddAuthorOptionsForm.js} | 18 +- .../EditImportListExclusionModalContent.js | 12 +- ...mportListExclusionModalContentConnector.js | 2 +- .../ImportListExclusion.css | 2 +- .../ImportListExclusion.js | 6 +- .../ImportLists/AddImportListModalContent.js | 2 +- .../ImportLists/EditImportListModalContent.js | 4 +- .../MediaManagement/MediaManagement.js | 34 +-- .../Settings/MediaManagement/Naming/Naming.js | 21 +- .../MediaManagement/Naming/NamingModal.js | 85 ++----- .../RootFolder/EditRootFolderModalContent.js | 10 +- .../EditNotificationModalContent.js | 2 +- .../Delay/EditDelayProfileModalContent.js | 4 +- .../EditMetadataProfileModalContent.js | 2 +- .../Profiles/Metadata/MetadataProfile.css | 2 +- .../Quality/EditQualityProfileModalContent.js | 4 +- .../Release/EditReleaseProfileModalContent.js | 2 +- .../Quality/Definition/QualityDefinitions.js | 2 +- frontend/src/Settings/Settings.js | 4 +- .../Tags/Details/TagDetailsModalContent.js | 12 +- .../TagDetailsModalContentConnector.js | 12 +- frontend/src/Settings/Tags/Tag.js | 2 +- frontend/src/Settings/Tags/Tags.js | 2 +- frontend/src/Settings/UI/UISettings.js | 6 +- ... createBatchToggleBookMonitoredHandler.js} | 14 +- .../src/Store/Actions/Settings/importLists.js | 2 +- .../{artistActions.js => authorActions.js} | 80 +++---- ...ditorActions.js => authorEditorActions.js} | 48 ++-- ...toryActions.js => authorHistoryActions.js} | 24 +- ...tIndexActions.js => authorIndexActions.js} | 162 ++++++------- .../src/Store/Actions/blacklistActions.js | 2 +- .../{albumActions.js => bookActions.js} | 92 ++++---- ...trackFileActions.js => bookFileActions.js} | 102 ++++----- ...istoryActions.js => bookHistoryActions.js} | 22 +- ...umStudioActions.js => bookshelfActions.js} | 52 ++--- frontend/src/Store/Actions/calendarActions.js | 4 +- frontend/src/Store/Actions/historyActions.js | 4 +- frontend/src/Store/Actions/index.js | 34 ++- .../Store/Actions/interactiveImportActions.js | 50 ++-- frontend/src/Store/Actions/queueActions.js | 4 +- frontend/src/Store/Actions/releaseActions.js | 28 +-- frontend/src/Store/Actions/searchActions.js | 38 +-- frontend/src/Store/Actions/seriesActions.js | 6 +- frontend/src/Store/Actions/trackActions.js | 120 ---------- frontend/src/Store/Actions/wantedActions.js | 14 +- frontend/src/Store/Migrators/migrate.js | 4 +- .../Migrators/migrateAddArtistDefaults.js | 14 -- .../Migrators/migrateAddAuthorDefaults.js | 14 ++ .../Store/Selectors/createAlbumSelector.js | 15 -- .../Selectors/createAllArtistSelector.js | 12 - .../Selectors/createAllAuthorsSelector.js | 12 + .../Selectors/createArtistCountSelector.js | 17 -- .../createArtistMetadataProfileSelector.js | 16 -- .../createArtistQualityProfileSelector.js | 16 -- .../Store/Selectors/createArtistSelector.js | 14 -- ...uthorClientSideCollectionItemsSelector.js} | 22 +- .../Selectors/createAuthorCountSelector.js | 17 ++ .../createAuthorMetadataProfileSelector.js | 16 ++ .../createAuthorQualityProfileSelector.js | 16 ++ .../Store/Selectors/createAuthorSelector.js | 14 ++ .../Store/Selectors/createBookFileSelector.js | 17 ++ .../src/Store/Selectors/createBookSelector.js | 15 ++ .../Selectors/createExistingArtistSelector.js | 15 -- .../Selectors/createExistingAuthorSelector.js | 15 ++ .../createImportArtistItemSelector.js | 27 --- .../createImportAuthorItemSelector.js | 26 +++ .../Selectors/createProfileInUseSelector.js | 8 +- .../Selectors/createQueueItemSelector.js | 4 +- .../Selectors/createTrackFileSelector.js | 17 -- .../Store/Selectors/createTrackSelector.js | 14 -- frontend/src/Store/scrollPositions.js | 2 +- frontend/src/Styles/Variables/dimensions.js | 8 +- frontend/src/System/Status/Health/Health.js | 6 +- .../TrackFile/Editor/TrackFileEditorTable.js | 16 -- .../src/UnmappedFiles/UnmappedFilesTable.js | 10 +- .../UnmappedFilesTableConnector.js | 24 +- .../UnmappedFiles/UnmappedFilesTableRow.js | 8 +- frontend/src/Utilities/Album/getNewAlbum.js | 18 -- frontend/src/Utilities/Artist/getNewArtist.js | 31 --- frontend/src/Utilities/Author/getNewAuthor.js | 29 +++ .../{Artist => Author}/getProgressBarKind.js | 0 .../{Artist => Author}/monitorOptions.js | 0 frontend/src/Utilities/Book/getNewBook.js | 18 ++ .../updateAlbums.js => Book/updateBooks.js} | 6 +- .../src/Wanted/CutoffUnmet/CutoffUnmet.js | 16 +- .../CutoffUnmet/CutoffUnmetConnector.js | 30 +-- .../src/Wanted/CutoffUnmet/CutoffUnmetRow.js | 42 ++-- .../CutoffUnmet/CutoffUnmetRowConnector.js | 8 +- frontend/src/Wanted/Missing/Missing.js | 16 +- .../src/Wanted/Missing/MissingConnector.js | 12 +- frontend/src/Wanted/Missing/MissingRow.js | 32 +-- .../src/Wanted/Missing/MissingRowConnector.js | 8 +- 387 files changed, 4040 insertions(+), 4368 deletions(-) rename frontend/src/{AddArtist/ArtistMetadataProfilePopoverContent.js => AddAuthor/AuthorMetadataProfilePopoverContent.js} (61%) rename frontend/src/{AddArtist/ArtistMonitoringOptionsPopoverContent.js => AddAuthor/AuthorMonitoringOptionsPopoverContent.js} (91%) delete mode 100644 frontend/src/AlbumStudio/AlbumStudioConnector.js delete mode 100644 frontend/src/AlbumStudio/AlbumStudioRowConnector.js delete mode 100644 frontend/src/Artist/Details/AlbumRowConnector.js delete mode 100644 frontend/src/Artist/Editor/ArtistEditorRow.css delete mode 100644 frontend/src/Artist/History/ArtistHistoryTable.js delete mode 100644 frontend/src/Artist/Index/Table/ArtistIndexActionsCell.js delete mode 100644 frontend/src/Artist/Index/Table/ArtistIndexHeaderConnector.js rename frontend/src/{Artist/ArtistBanner.js => Author/AuthorBanner.js} (94%) rename frontend/src/{Artist/ArtistImage.js => Author/AuthorImage.js} (96%) rename frontend/src/{Artist/ArtistNameLink.js => Author/AuthorNameLink.js} (58%) rename frontend/src/{Artist/ArtistPoster.js => Author/AuthorPoster.js} (91%) rename frontend/src/{Artist/Delete/DeleteArtistModal.js => Author/Delete/DeleteAuthorModal.js} (71%) rename frontend/src/{Album/Delete/DeleteAlbumModalContent.css => Author/Delete/DeleteAuthorModalContent.css} (100%) rename frontend/src/{Artist/Delete/DeleteArtistModalContent.js => Author/Delete/DeleteAuthorModalContent.js} (77%) rename frontend/src/{Artist/Delete/DeleteArtistModalContentConnector.js => Author/Delete/DeleteAuthorModalContentConnector.js} (59%) rename frontend/src/{Artist/Details/ArtistAlternateTitles.css => Author/Details/AuthorAlternateTitles.css} (100%) rename frontend/src/{Artist/Details/ArtistAlternateTitles.js => Author/Details/AuthorAlternateTitles.js} (71%) rename frontend/src/{Artist/Details/ArtistDetails.css => Author/Details/AuthorDetails.css} (98%) rename frontend/src/{Artist/Details/ArtistDetails.js => Author/Details/AuthorDetails.js} (80%) rename frontend/src/{Artist/Details/ArtistDetailsConnector.js => Author/Details/AuthorDetailsConnector.js} (51%) rename frontend/src/{Album/Details/AlbumDetailsLinks.css => Author/Details/AuthorDetailsLinks.css} (100%) rename frontend/src/{Artist/Details/ArtistDetailsLinks.js => Author/Details/AuthorDetailsLinks.js} (85%) rename frontend/src/{Artist/Details/ArtistDetailsPageConnector.js => Author/Details/AuthorDetailsPageConnector.js} (84%) rename frontend/src/{Artist/Details/ArtistDetailsSeason.css => Author/Details/AuthorDetailsSeason.css} (95%) rename frontend/src/{Artist/Details/ArtistDetailsSeason.js => Author/Details/AuthorDetailsSeason.js} (73%) rename frontend/src/{Artist/Details/ArtistDetailsSeasonConnector.js => Author/Details/AuthorDetailsSeasonConnector.js} (52%) rename frontend/src/{Artist => Author}/Details/AuthorDetailsSeries.css (95%) rename frontend/src/{Artist => Author}/Details/AuthorDetailsSeries.js (84%) rename frontend/src/{Artist => Author}/Details/AuthorDetailsSeriesConnector.js (80%) rename frontend/src/{Artist/Details/ArtistTags.css => Author/Details/AuthorTags.css} (100%) rename frontend/src/{Artist/Details/ArtistTags.js => Author/Details/AuthorTags.js} (85%) rename frontend/src/{Artist/Details/ArtistTagsConnector.js => Author/Details/AuthorTagsConnector.js} (64%) rename frontend/src/{Artist/Details/AlbumRow.css => Author/Details/BookRow.css} (100%) rename frontend/src/{Artist/Details/AlbumRow.js => Author/Details/BookRow.js} (75%) create mode 100644 frontend/src/Author/Details/BookRowConnector.js rename frontend/src/{Artist/Edit/EditArtistModal.js => Author/Edit/EditAuthorModal.js} (62%) rename frontend/src/{Artist/Edit/EditArtistModalConnector.js => Author/Edit/EditAuthorModalConnector.js} (66%) rename frontend/src/{Artist/Edit/EditArtistModalContent.css => Author/Edit/EditAuthorModalContent.css} (100%) rename frontend/src/{Artist/Edit/EditArtistModalContent.js => Author/Edit/EditAuthorModalContent.js} (85%) rename frontend/src/{Artist/Edit/EditArtistModalContentConnector.js => Author/Edit/EditAuthorModalContentConnector.js} (60%) rename frontend/src/{Artist/Editor/AudioTags/RetagArtistModal.js => Author/Editor/AudioTags/RetagAuthorModal.js} (69%) rename frontend/src/{Artist/Editor/AudioTags/RetagArtistModalContent.css => Author/Editor/AudioTags/RetagAuthorModalContent.css} (100%) rename frontend/src/{Artist/Editor/AudioTags/RetagArtistModalContent.js => Author/Editor/AudioTags/RetagAuthorModalContent.js} (66%) rename frontend/src/{Artist/Editor/AudioTags/RetagArtistModalContentConnector.js => Author/Editor/AudioTags/RetagAuthorModalContentConnector.js} (58%) rename frontend/src/{Artist/Editor/ArtistEditor.js => Author/Editor/AuthorEditor.js} (77%) rename frontend/src/{Artist/Editor/ArtistEditorConnector.js => Author/Editor/AuthorEditorConnector.js} (58%) rename frontend/src/{Artist/Editor/ArtistEditorFilterModalConnector.js => Author/Editor/AuthorEditorFilterModalConnector.js} (65%) rename frontend/src/{Artist/Editor/ArtistEditorFooter.css => Author/Editor/AuthorEditorFooter.css} (97%) rename frontend/src/{Artist/Editor/ArtistEditorFooter.js => Author/Editor/AuthorEditorFooter.js} (73%) rename frontend/src/{Artist/Editor/ArtistEditorFooterLabel.css => Author/Editor/AuthorEditorFooterLabel.css} (100%) rename frontend/src/{Artist/Editor/ArtistEditorFooterLabel.js => Author/Editor/AuthorEditorFooterLabel.js} (74%) rename frontend/src/{Artist/Editor/ArtistEditorRow.js => Author/Editor/AuthorEditorRow.js} (76%) rename frontend/src/{Artist/Editor/ArtistEditorRowConnector.js => Author/Editor/AuthorEditorRowConnector.js} (76%) rename frontend/src/{Search/Artist/AddNewArtistModal.js => Author/Editor/Delete/DeleteAuthorModal.js} (68%) rename frontend/src/{Artist/Editor/Delete/DeleteArtistModalContent.css => Author/Editor/Delete/DeleteAuthorModalContent.css} (100%) rename frontend/src/{Artist/Editor/Delete/DeleteArtistModalContent.js => Author/Editor/Delete/DeleteAuthorModalContent.js} (77%) rename frontend/src/{Artist/Editor/Delete/DeleteArtistModalContentConnector.js => Author/Editor/Delete/DeleteAuthorModalContentConnector.js} (53%) rename frontend/src/{Artist/Editor/Organize/OrganizeArtistModal.js => Author/Editor/Organize/OrganizeAuthorModal.js} (64%) rename frontend/src/{Artist/Editor/Organize/OrganizeArtistModalContent.css => Author/Editor/Organize/OrganizeAuthorModalContent.css} (100%) rename frontend/src/{Artist/Editor/Organize/OrganizeArtistModalContent.js => Author/Editor/Organize/OrganizeAuthorModalContent.js} (66%) rename frontend/src/{Artist/Editor/Organize/OrganizeArtistModalContentConnector.js => Author/Editor/Organize/OrganizeAuthorModalContentConnector.js} (57%) rename frontend/src/{Artist => Author}/Editor/Tags/TagsModal.js (100%) rename frontend/src/{Artist => Author}/Editor/Tags/TagsModalContent.css (100%) rename frontend/src/{Artist => Author}/Editor/Tags/TagsModalContent.js (95%) rename frontend/src/{Artist => Author}/Editor/Tags/TagsModalContentConnector.js (69%) rename frontend/src/{Artist/History/ArtistHistoryContentConnector.js => Author/History/AuthorHistoryContentConnector.js} (60%) rename frontend/src/{Artist/History/ArtistHistoryModal.js => Author/History/AuthorHistoryModal.js} (59%) rename frontend/src/{Artist/History/ArtistHistoryModalContent.js => Author/History/AuthorHistoryModalContent.js} (78%) rename frontend/src/{Artist/History/ArtistHistoryRow.css => Author/History/AuthorHistoryRow.css} (100%) rename frontend/src/{Artist/History/ArtistHistoryRow.js => Author/History/AuthorHistoryRow.js} (83%) rename frontend/src/{Artist/History/ArtistHistoryRowConnector.js => Author/History/AuthorHistoryRowConnector.js} (55%) create mode 100644 frontend/src/Author/History/AuthorHistoryTable.js rename frontend/src/{Artist/History/ArtistHistoryTableContent.js => Author/History/AuthorHistoryTableContent.js} (84%) rename frontend/src/{Artist/Index/ArtistIndex.css => Author/Index/AuthorIndex.css} (100%) rename frontend/src/{Artist/Index/ArtistIndex.js => Author/Index/AuthorIndex.js} (81%) rename frontend/src/{Artist/Index/ArtistIndexConnector.js => Author/Index/AuthorIndexConnector.js} (59%) rename frontend/src/{Artist/Index/ArtistIndexFilterModalConnector.js => Author/Index/AuthorIndexFilterModalConnector.js} (66%) rename frontend/src/{Artist/Index/ArtistIndexFooter.css => Author/Index/AuthorIndexFooter.css} (100%) rename frontend/src/{Artist/Index/ArtistIndexFooter.js => Author/Index/AuthorIndexFooter.js} (87%) rename frontend/src/{Artist/Index/ArtistIndexFooterConnector.js => Author/Index/AuthorIndexFooterConnector.js} (66%) rename frontend/src/{Artist/Index/ArtistIndexItemConnector.js => Author/Index/AuthorIndexItemConnector.js} (53%) rename frontend/src/{Artist/Index/Banners/ArtistIndexBanner.css => Author/Index/Banners/AuthorIndexBanner.css} (100%) rename frontend/src/{Artist/Index/Banners/ArtistIndexBanner.js => Author/Index/Banners/AuthorIndexBanner.js} (67%) rename frontend/src/{Artist/Index/Banners/ArtistIndexBannerInfo.css => Author/Index/Banners/AuthorIndexBannerInfo.css} (100%) rename frontend/src/{Artist/Index/Posters/ArtistIndexPosterInfo.js => Author/Index/Banners/AuthorIndexBannerInfo.js} (82%) rename frontend/src/{Artist/Index/Banners/ArtistIndexBanners.css => Author/Index/Banners/AuthorIndexBanners.css} (100%) rename frontend/src/{Artist/Index/Banners/ArtistIndexBanners.js => Author/Index/Banners/AuthorIndexBanners.js} (90%) rename frontend/src/{Artist/Index/Banners/ArtistIndexBannersConnector.js => Author/Index/Banners/AuthorIndexBannersConnector.js} (80%) rename frontend/src/{Artist/Index/Banners/Options/ArtistIndexBannerOptionsModal.js => Author/Index/Banners/Options/AuthorIndexBannerOptionsModal.js} (54%) rename frontend/src/{Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContent.js => Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContent.js} (96%) rename frontend/src/{Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContentConnector.js => Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContentConnector.js} (53%) rename frontend/src/{Artist/Index/Menus/ArtistIndexFilterMenu.js => Author/Index/Menus/AuthorIndexFilterMenu.js} (75%) rename frontend/src/{Artist/Index/Menus/ArtistIndexSortMenu.js => Author/Index/Menus/AuthorIndexSortMenu.js} (90%) rename frontend/src/{Artist/Index/Menus/ArtistIndexViewMenu.js => Author/Index/Menus/AuthorIndexViewMenu.js} (92%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverview.css => Author/Index/Overview/AuthorIndexOverview.css} (100%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverview.js => Author/Index/Overview/AuthorIndexOverview.js} (68%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverviewInfo.css => Author/Index/Overview/AuthorIndexOverviewInfo.css} (100%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverviewInfo.js => Author/Index/Overview/AuthorIndexOverviewInfo.js} (80%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverviewInfoRow.css => Author/Index/Overview/AuthorIndexOverviewInfoRow.css} (70%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverviewInfoRow.js => Author/Index/Overview/AuthorIndexOverviewInfoRow.js} (72%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverviews.css => Author/Index/Overview/AuthorIndexOverviews.css} (100%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverviews.js => Author/Index/Overview/AuthorIndexOverviews.js} (89%) rename frontend/src/{Artist/Index/Overview/ArtistIndexOverviewsConnector.js => Author/Index/Overview/AuthorIndexOverviewsConnector.js} (81%) rename frontend/src/{Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModal.js => Author/Index/Overview/Options/AuthorIndexOverviewOptionsModal.js} (54%) rename frontend/src/{Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContent.js => Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContent.js} (88%) rename frontend/src/{Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContentConnector.js => Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContentConnector.js} (53%) rename frontend/src/{Artist/Index/Posters/ArtistIndexPoster.css => Author/Index/Posters/AuthorIndexPoster.css} (100%) rename frontend/src/{Artist/Index/Posters/ArtistIndexPoster.js => Author/Index/Posters/AuthorIndexPoster.js} (68%) rename frontend/src/{Artist/Index/Posters/ArtistIndexPosterInfo.css => Author/Index/Posters/AuthorIndexPosterInfo.css} (100%) rename frontend/src/{Artist/Index/Banners/ArtistIndexBannerInfo.js => Author/Index/Posters/AuthorIndexPosterInfo.js} (82%) rename frontend/src/{Artist/Index/Posters/ArtistIndexPosters.css => Author/Index/Posters/AuthorIndexPosters.css} (100%) rename frontend/src/{Artist/Index/Posters/ArtistIndexPosters.js => Author/Index/Posters/AuthorIndexPosters.js} (91%) rename frontend/src/{Artist/Index/Posters/ArtistIndexPostersConnector.js => Author/Index/Posters/AuthorIndexPostersConnector.js} (80%) rename frontend/src/{Artist/Index/Posters/Options/ArtistIndexPosterOptionsModal.js => Author/Index/Posters/Options/AuthorIndexPosterOptionsModal.js} (54%) rename frontend/src/{Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContent.js => Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContent.js} (96%) rename frontend/src/{Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContentConnector.js => Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContentConnector.js} (53%) rename frontend/src/{Artist/Index/ProgressBar/ArtistIndexProgressBar.css => Author/Index/ProgressBar/AuthorIndexProgressBar.css} (100%) rename frontend/src/{Artist/Index/ProgressBar/ArtistIndexProgressBar.js => Author/Index/ProgressBar/AuthorIndexProgressBar.js} (55%) create mode 100644 frontend/src/Author/Index/Table/AuthorIndexActionsCell.js rename frontend/src/{Artist/Index/Table/ArtistIndexHeader.css => Author/Index/Table/AuthorIndexHeader.css} (94%) rename frontend/src/{Artist/Index/Table/ArtistIndexHeader.js => Author/Index/Table/AuthorIndexHeader.js} (89%) create mode 100644 frontend/src/Author/Index/Table/AuthorIndexHeaderConnector.js rename frontend/src/{Artist/Index/Table/ArtistIndexRow.css => Author/Index/Table/AuthorIndexRow.css} (90%) rename frontend/src/{Artist/Index/Table/ArtistIndexRow.js => Author/Index/Table/AuthorIndexRow.js} (70%) rename frontend/src/{Artist/Index/Table/ArtistIndexTable.css => Author/Index/Table/AuthorIndexTable.css} (100%) rename frontend/src/{Artist/Index/Table/ArtistIndexTable.js => Author/Index/Table/AuthorIndexTable.js} (80%) rename frontend/src/{Artist/Index/Table/ArtistIndexTableConnector.js => Author/Index/Table/AuthorIndexTableConnector.js} (66%) rename frontend/src/{Artist/Index/Table/ArtistIndexTableOptions.js => Author/Index/Table/AuthorIndexTableOptions.js} (94%) rename frontend/src/{Artist/Index/Table/ArtistIndexTableOptionsConnector.js => Author/Index/Table/AuthorIndexTableOptionsConnector.js} (55%) rename frontend/src/{Artist/Index/Table/ArtistStatusCell.css => Author/Index/Table/AuthorStatusCell.css} (100%) rename frontend/src/{Artist/Index/Table/ArtistStatusCell.js => Author/Index/Table/AuthorStatusCell.js} (67%) rename frontend/src/{Artist => Author}/Index/Table/hasGrowableColumns.js (100%) rename frontend/src/{Artist/MoveArtist/MoveArtistModal.css => Author/MoveAuthor/MoveAuthorModal.css} (100%) rename frontend/src/{Artist/MoveArtist/MoveArtistModal.js => Author/MoveAuthor/MoveAuthorModal.js} (82%) rename frontend/src/{Artist/NoArtist.css => Author/NoAuthor.css} (100%) rename frontend/src/{Artist/NoArtist.js => Author/NoAuthor.js} (90%) rename frontend/src/{Album/AlbumCover.js => Book/BookCover.js} (94%) rename frontend/src/{Album/TrackQuality.js => Book/BookQuality.js} (89%) rename frontend/src/{Album/AlbumSearchCell.css => Book/BookSearchCell.css} (84%) rename frontend/src/{Album/AlbumSearchCell.js => Book/BookSearchCell.js} (76%) rename frontend/src/{Album/AlbumSearchCellConnector.js => Book/BookSearchCellConnector.js} (70%) rename frontend/src/{Album/AlbumTitleLink.css => Book/BookTitleLink.css} (100%) rename frontend/src/{Album/AlbumTitleLink.js => Book/BookTitleLink.js} (75%) rename frontend/src/{Album/Delete/DeleteAlbumModal.js => Book/Delete/DeleteBookModal.js} (69%) rename frontend/src/{Artist/Delete/DeleteArtistModalContent.css => Book/Delete/DeleteBookModalContent.css} (100%) rename frontend/src/{Album/Delete/DeleteAlbumModalContent.js => Book/Delete/DeleteBookModalContent.js} (78%) rename frontend/src/{Album/Delete/DeleteAlbumModalContentConnector.js => Book/Delete/DeleteBookModalContentConnector.js} (65%) rename frontend/src/{Album/Details/AlbumDetails.css => Book/Details/BookDetails.css} (96%) rename frontend/src/{Album/Details/AlbumDetails.js => Book/Details/BookDetails.js} (84%) rename frontend/src/{Album/Details/AlbumDetailsConnector.js => Book/Details/BookDetailsConnector.js} (55%) rename frontend/src/{Artist/Details/ArtistDetailsLinks.css => Book/Details/BookDetailsLinks.css} (100%) rename frontend/src/{Album/Details/AlbumDetailsLinks.js => Book/Details/BookDetailsLinks.js} (85%) rename frontend/src/{Album/Details/AlbumDetailsPageConnector.js => Book/Details/BookDetailsPageConnector.js} (72%) rename frontend/src/{Album => Book}/EpisodeNumber.css (100%) rename frontend/src/{Album => Book}/EpisodeNumber.js (88%) rename frontend/src/{Album => Book}/EpisodeStatus.css (100%) rename frontend/src/{Album => Book}/EpisodeStatus.js (78%) rename frontend/src/{Album => Book}/EpisodeStatusConnector.js (71%) rename frontend/src/{Album => Book}/SceneInfo.css (100%) rename frontend/src/{Album => Book}/SceneInfo.js (95%) rename frontend/src/{Album/Search/AlbumInteractiveSearchModal.js => Book/Search/BookInteractiveSearchModal.js} (58%) rename frontend/src/{Album/Search/AlbumInteractiveSearchModalConnector.js => Book/Search/BookInteractiveSearchModalConnector.js} (67%) rename frontend/src/{Album/Search/AlbumInteractiveSearchModalContent.js => Book/Search/BookInteractiveSearchModalContent.js} (77%) rename frontend/src/{Album => Book}/SeasonEpisodeNumber.js (79%) rename frontend/src/{Album/albumEntities.js => Book/bookEntities.js} (69%) rename frontend/src/{TrackFile/Editor/TrackFileEditorRow.js => BookFile/Editor/BookFileEditorRow.js} (82%) create mode 100644 frontend/src/BookFile/Editor/BookFileEditorTable.js rename frontend/src/{TrackFile/Editor/TrackFileEditorTableContent.css => BookFile/Editor/BookFileEditorTableContent.css} (100%) rename frontend/src/{TrackFile/Editor/TrackFileEditorTableContent.js => BookFile/Editor/BookFileEditorTableContent.js} (91%) rename frontend/src/{TrackFile/Editor/TrackFileEditorTableContentConnector.js => BookFile/Editor/BookFileEditorTableContentConnector.js} (58%) rename frontend/src/{TrackFile => BookFile}/ExpandingFileDetails.css (100%) rename frontend/src/{TrackFile => BookFile}/ExpandingFileDetails.js (100%) rename frontend/src/{TrackFile => BookFile}/FileDetails.css (100%) rename frontend/src/{TrackFile => BookFile}/FileDetails.js (90%) rename frontend/src/{TrackFile => BookFile}/FileDetailsConnector.js (84%) rename frontend/src/{TrackFile => BookFile}/FileDetailsModal.js (100%) rename frontend/src/{TrackFile => BookFile}/MediaInfo.js (100%) rename frontend/src/{TrackFile => BookFile}/MediaInfoConnector.js (62%) rename frontend/src/{TrackFile => BookFile}/mediaInfoTypes.js (100%) rename frontend/src/{AlbumStudio/AlbumStudio.css => Bookshelf/Bookshelf.css} (100%) rename frontend/src/{AlbumStudio/AlbumStudio.js => Bookshelf/Bookshelf.js} (88%) rename frontend/src/{AlbumStudio/AlbumStudioAlbum.css => Bookshelf/BookshelfBook.css} (91%) rename frontend/src/{AlbumStudio/AlbumStudioAlbum.js => Bookshelf/BookshelfBook.js} (57%) create mode 100644 frontend/src/Bookshelf/BookshelfConnector.js rename frontend/src/{AlbumStudio/AlbumStudioFilterModalConnector.js => Bookshelf/BookshelfFilterModalConnector.js} (64%) rename frontend/src/{AlbumStudio/AlbumStudioFooter.css => Bookshelf/BookshelfFooter.css} (100%) rename frontend/src/{AlbumStudio/AlbumStudioFooter.js => Bookshelf/BookshelfFooter.js} (91%) rename frontend/src/{AlbumStudio/AlbumStudioRow.css => Bookshelf/BookshelfRow.css} (98%) rename frontend/src/{AlbumStudio/AlbumStudioRow.js => Bookshelf/BookshelfRow.js} (64%) create mode 100644 frontend/src/Bookshelf/BookshelfRowConnector.js rename frontend/src/{AlbumStudio/AlbumStudioTableHeader.css => Bookshelf/BookshelfTableHeader.css} (96%) rename frontend/src/{AlbumStudio/AlbumStudioTableHeader.js => Bookshelf/BookshelfTableHeader.js} (89%) rename frontend/src/Components/Filter/Builder/{ArtistStatusFilterBuilderRowValue.js => AuthorStatusFilterBuilderRowValue.js} (73%) delete mode 100644 frontend/src/Components/Form/AlbumReleaseSelectInputConnector.js create mode 100644 frontend/src/Components/Form/BookReleaseSelectInputConnector.js rename frontend/src/Components/Form/{MonitorAlbumsSelectInput.js => MonitorBooksSelectInput.js} (76%) rename frontend/src/Components/Page/Header/{ArtistSearchInput.css => AuthorSearchInput.css} (95%) rename frontend/src/Components/Page/Header/{ArtistSearchInput.js => AuthorSearchInput.js} (82%) rename frontend/src/Components/Page/Header/{ArtistSearchInputConnector.js => AuthorSearchInputConnector.js} (70%) rename frontend/src/Components/Page/Header/{ArtistSearchResult.css => AuthorSearchResult.css} (100%) rename frontend/src/Components/Page/Header/{ArtistSearchResult.js => AuthorSearchResult.js} (77%) rename frontend/src/InteractiveImport/{Artist/SelectArtistModal.js => Author/SelectAuthorModal.js} (71%) rename frontend/src/InteractiveImport/{Album/SelectAlbumModalContent.css => Author/SelectAuthorModalContent.css} (100%) rename frontend/src/InteractiveImport/{Artist/SelectArtistModalContent.js => Author/SelectAuthorModalContent.js} (76%) rename frontend/src/InteractiveImport/{Artist/SelectArtistModalContentConnector.js => Author/SelectAuthorModalContentConnector.js} (70%) rename frontend/src/InteractiveImport/{Artist/SelectArtistRow.css => Author/SelectAuthorRow.css} (85%) rename frontend/src/InteractiveImport/{Artist/SelectArtistRow.js => Author/SelectAuthorRow.js} (50%) rename frontend/src/InteractiveImport/{Album/SelectAlbumModal.js => Book/SelectBookModal.js} (69%) rename frontend/src/InteractiveImport/{Artist/SelectArtistModalContent.css => Book/SelectBookModalContent.css} (100%) rename frontend/src/InteractiveImport/{Album/SelectAlbumModalContent.js => Book/SelectBookModalContent.js} (87%) rename frontend/src/InteractiveImport/{Album/SelectAlbumModalContentConnector.js => Book/SelectBookModalContentConnector.js} (55%) rename frontend/src/InteractiveImport/{Album/SelectAlbumRow.css => Book/SelectBookRow.css} (63%) rename frontend/src/InteractiveImport/{Album/SelectAlbumRow.js => Book/SelectBookRow.js} (72%) rename frontend/src/{Artist/Editor/Delete/DeleteArtistModal.js => Search/Author/AddNewAuthorModal.js} (68%) rename frontend/src/Search/{Artist/AddNewArtistModalContent.css => Author/AddNewAuthorModalContent.css} (88%) rename frontend/src/Search/{Artist/AddNewArtistModalContent.js => Author/AddNewAuthorModalContent.js} (68%) rename frontend/src/Search/{Artist/AddNewArtistModalContentConnector.js => Author/AddNewAuthorModalContentConnector.js} (78%) rename frontend/src/Search/{Artist/AddNewArtistSearchResult.css => Author/AddNewAuthorSearchResult.css} (100%) rename frontend/src/Search/{Artist/AddNewArtistSearchResult.js => Author/AddNewAuthorSearchResult.js} (76%) rename frontend/src/Search/{Artist/AddNewArtistSearchResultConnector.js => Author/AddNewAuthorSearchResultConnector.js} (52%) rename frontend/src/Search/{Album/AddNewAlbumModal.js => Book/AddNewBookModal.js} (66%) rename frontend/src/Search/{Album/AddNewAlbumModalContent.css => Book/AddNewBookModalContent.css} (90%) rename frontend/src/Search/{Album/AddNewAlbumModalContent.js => Book/AddNewBookModalContent.js} (65%) rename frontend/src/Search/{Album/AddNewAlbumModalContentConnector.js => Book/AddNewBookModalContentConnector.js} (79%) rename frontend/src/Search/{Album/AddNewAlbumSearchResult.css => Book/AddNewBookSearchResult.css} (98%) rename frontend/src/Search/{Album/AddNewAlbumSearchResult.js => Book/AddNewBookSearchResult.js} (73%) rename frontend/src/Search/{Album/AddNewAlbumSearchResultConnector.js => Book/AddNewBookSearchResultConnector.js} (72%) rename frontend/src/Search/Common/{AddArtistOptionsForm.css => AddAuthorOptionsForm.css} (100%) rename frontend/src/Search/Common/{AddArtistOptionsForm.js => AddAuthorOptionsForm.js} (86%) rename frontend/src/Store/Actions/Creators/{createBatchToggleAlbumMonitoredHandler.js => createBatchToggleBookMonitoredHandler.js} (63%) rename frontend/src/Store/Actions/{artistActions.js => authorActions.js} (71%) rename frontend/src/Store/Actions/{artistEditorActions.js => authorEditorActions.js} (73%) rename frontend/src/Store/Actions/{artistHistoryActions.js => authorHistoryActions.js} (69%) rename frontend/src/Store/Actions/{artistIndexActions.js => authorIndexActions.js} (66%) rename frontend/src/Store/Actions/{albumActions.js => bookActions.js} (63%) rename frontend/src/Store/Actions/{trackFileActions.js => bookFileActions.js} (59%) rename frontend/src/Store/Actions/{albumHistoryActions.js => bookHistoryActions.js} (71%) rename frontend/src/Store/Actions/{albumStudioActions.js => bookshelfActions.js} (69%) delete mode 100644 frontend/src/Store/Actions/trackActions.js delete mode 100644 frontend/src/Store/Migrators/migrateAddArtistDefaults.js create mode 100644 frontend/src/Store/Migrators/migrateAddAuthorDefaults.js delete mode 100644 frontend/src/Store/Selectors/createAlbumSelector.js delete mode 100644 frontend/src/Store/Selectors/createAllArtistSelector.js create mode 100644 frontend/src/Store/Selectors/createAllAuthorsSelector.js delete mode 100644 frontend/src/Store/Selectors/createArtistCountSelector.js delete mode 100644 frontend/src/Store/Selectors/createArtistMetadataProfileSelector.js delete mode 100644 frontend/src/Store/Selectors/createArtistQualityProfileSelector.js delete mode 100644 frontend/src/Store/Selectors/createArtistSelector.js rename frontend/src/Store/Selectors/{createArtistClientSideCollectionItemsSelector.js => createAuthorClientSideCollectionItemsSelector.js} (58%) create mode 100644 frontend/src/Store/Selectors/createAuthorCountSelector.js create mode 100644 frontend/src/Store/Selectors/createAuthorMetadataProfileSelector.js create mode 100644 frontend/src/Store/Selectors/createAuthorQualityProfileSelector.js create mode 100644 frontend/src/Store/Selectors/createAuthorSelector.js create mode 100644 frontend/src/Store/Selectors/createBookFileSelector.js create mode 100644 frontend/src/Store/Selectors/createBookSelector.js delete mode 100644 frontend/src/Store/Selectors/createExistingArtistSelector.js create mode 100644 frontend/src/Store/Selectors/createExistingAuthorSelector.js delete mode 100644 frontend/src/Store/Selectors/createImportArtistItemSelector.js create mode 100644 frontend/src/Store/Selectors/createImportAuthorItemSelector.js delete mode 100644 frontend/src/Store/Selectors/createTrackFileSelector.js delete mode 100644 frontend/src/Store/Selectors/createTrackSelector.js delete mode 100644 frontend/src/TrackFile/Editor/TrackFileEditorTable.js delete mode 100644 frontend/src/Utilities/Album/getNewAlbum.js delete mode 100644 frontend/src/Utilities/Artist/getNewArtist.js create mode 100644 frontend/src/Utilities/Author/getNewAuthor.js rename frontend/src/Utilities/{Artist => Author}/getProgressBarKind.js (100%) rename frontend/src/Utilities/{Artist => Author}/monitorOptions.js (100%) create mode 100644 frontend/src/Utilities/Book/getNewBook.js rename frontend/src/Utilities/{Album/updateAlbums.js => Book/updateBooks.js} (68%) diff --git a/frontend/src/Activity/Blacklist/BlacklistRow.js b/frontend/src/Activity/Blacklist/BlacklistRow.js index e026f02bc..4789848ae 100644 --- a/frontend/src/Activity/Blacklist/BlacklistRow.js +++ b/frontend/src/Activity/Blacklist/BlacklistRow.js @@ -6,8 +6,8 @@ import IconButton from 'Components/Link/IconButton'; import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector'; import TableRow from 'Components/Table/TableRow'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; -import TrackQuality from 'Album/TrackQuality'; -import ArtistNameLink from 'Artist/ArtistNameLink'; +import BookQuality from 'Book/BookQuality'; +import AuthorNameLink from 'Author/AuthorNameLink'; import BlacklistDetailsModal from './BlacklistDetailsModal'; import styles from './BlacklistRow.css'; @@ -40,7 +40,7 @@ class BlacklistRow extends Component { render() { const { - artist, + author, sourceTitle, quality, date, @@ -51,7 +51,7 @@ class BlacklistRow extends Component { onRemovePress } = this.props; - if (!artist) { + if (!author) { return null; } @@ -71,9 +71,9 @@ class BlacklistRow extends Component { if (name === 'authors.sortName') { return ( - ); @@ -93,7 +93,7 @@ class BlacklistRow extends Component { key={name} className={styles.quality} > - @@ -161,7 +161,7 @@ class BlacklistRow extends Component { BlacklistRow.propTypes = { id: PropTypes.number.isRequired, - artist: PropTypes.object.isRequired, + author: PropTypes.object.isRequired, sourceTitle: PropTypes.string.isRequired, quality: PropTypes.object.isRequired, date: PropTypes.string.isRequired, diff --git a/frontend/src/Activity/Blacklist/BlacklistRowConnector.js b/frontend/src/Activity/Blacklist/BlacklistRowConnector.js index a85f1f78b..550d43347 100644 --- a/frontend/src/Activity/Blacklist/BlacklistRowConnector.js +++ b/frontend/src/Activity/Blacklist/BlacklistRowConnector.js @@ -1,15 +1,15 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import { removeFromBlacklist } from 'Store/Actions/blacklistActions'; import BlacklistRow from './BlacklistRow'; function createMapStateToProps() { return createSelector( - createArtistSelector(), - (artist) => { + createAuthorSelector(), + (author) => { return { - artist + author }; } ); diff --git a/frontend/src/Activity/History/Details/HistoryDetails.js b/frontend/src/Activity/History/Details/HistoryDetails.js index 3088f3693..2c3b6a2c0 100644 --- a/frontend/src/Activity/History/Details/HistoryDetails.js +++ b/frontend/src/Activity/History/Details/HistoryDetails.js @@ -170,7 +170,7 @@ function HistoryDetails(props) { ); } - if (eventType === 'trackFileImported') { + if (eventType === 'bookFileImported') { const { droppedPath, importedPath @@ -205,7 +205,7 @@ function HistoryDetails(props) { ); } - if (eventType === 'trackFileDeleted') { + if (eventType === 'bookFileDeleted') { const { reason } = data; @@ -241,7 +241,7 @@ function HistoryDetails(props) { ); } - if (eventType === 'trackFileRenamed') { + if (eventType === 'bookFileRenamed') { const { sourcePath, path @@ -262,7 +262,7 @@ function HistoryDetails(props) { ); } - if (eventType === 'trackFileRetagged') { + if (eventType === 'bookFileRetagged') { const { diff, tagsScrubbed @@ -293,7 +293,7 @@ function HistoryDetails(props) { ); } - if (eventType === 'albumImportIncomplete') { + if (eventType === 'bookImportIncomplete') { const { statusMessages } = data; diff --git a/frontend/src/Activity/History/Details/HistoryDetailsModal.js b/frontend/src/Activity/History/Details/HistoryDetailsModal.js index adbc5366d..8a0d7a015 100644 --- a/frontend/src/Activity/History/Details/HistoryDetailsModal.js +++ b/frontend/src/Activity/History/Details/HistoryDetailsModal.js @@ -17,16 +17,16 @@ function getHeaderTitle(eventType) { return 'Grabbed'; case 'downloadFailed': return 'Download Failed'; - case 'trackFileImported': - return 'Track Imported'; - case 'trackFileDeleted': - return 'Track File Deleted'; - case 'trackFileRenamed': - return 'Track File Renamed'; - case 'trackFileRetagged': - return 'Track File Tags Updated'; - case 'albumImportIncomplete': - return 'Album Import Incomplete'; + case 'bookFileImported': + return 'Book Imported'; + case 'bookFileDeleted': + return 'Book File Deleted'; + case 'bookFileRenamed': + return 'Book File Renamed'; + case 'bookFileRetagged': + return 'Book File Tags Updated'; + case 'bookImportIncomplete': + return 'Book Import Incomplete'; case 'downloadImported': return 'Download Completed'; case 'downloadIgnored': diff --git a/frontend/src/Activity/History/History.js b/frontend/src/Activity/History/History.js index a525d9988..36bc58748 100644 --- a/frontend/src/Activity/History/History.js +++ b/frontend/src/Activity/History/History.js @@ -22,7 +22,7 @@ class History extends Component { shouldComponentUpdate(nextProps) { // Don't update when fetching has completed if items have changed, - // before albums start fetching or when albums start fetching. + // before books start fetching or when books start fetching. if ( ( @@ -30,7 +30,7 @@ class History extends Component { nextProps.isPopulated && hasDifferentItems(this.props.items, nextProps.items) ) || - (!this.props.isAlbumsFetching && nextProps.isAlbumsFetching) + (!this.props.isBooksFetching && nextProps.isBooksFetching) ) { return false; } @@ -51,17 +51,17 @@ class History extends Component { selectedFilterKey, filters, totalRecords, - isAlbumsFetching, - isAlbumsPopulated, - albumsError, + isBooksFetching, + isBooksPopulated, + booksError, onFilterSelect, onFirstPagePress, ...otherProps } = this.props; - const isFetchingAny = isFetching || isAlbumsFetching; - const isAllPopulated = isPopulated && (isAlbumsPopulated || !items.length); - const hasError = error || albumsError; + const isFetchingAny = isFetching || isBooksFetching; + const isAllPopulated = isPopulated && (isBooksPopulated || !items.length); + const hasError = error || booksError; return ( @@ -109,7 +109,7 @@ class History extends Component { { // If history isPopulated and it's empty show no history found and don't - // wait for the albums to populate because they are never coming. + // wait for the books to populate because they are never coming. isPopulated && !hasError && !items.length &&
@@ -162,9 +162,9 @@ History.propTypes = { selectedFilterKey: PropTypes.string.isRequired, filters: PropTypes.arrayOf(PropTypes.object).isRequired, totalRecords: PropTypes.number, - isAlbumsFetching: PropTypes.bool.isRequired, - isAlbumsPopulated: PropTypes.bool.isRequired, - albumsError: PropTypes.object, + isBooksFetching: PropTypes.bool.isRequired, + isBooksPopulated: PropTypes.bool.isRequired, + booksError: PropTypes.object, onFilterSelect: PropTypes.func.isRequired, onFirstPagePress: PropTypes.func.isRequired }; diff --git a/frontend/src/Activity/History/HistoryConnector.js b/frontend/src/Activity/History/HistoryConnector.js index 7d5bfdca5..9585fd57b 100644 --- a/frontend/src/Activity/History/HistoryConnector.js +++ b/frontend/src/Activity/History/HistoryConnector.js @@ -7,23 +7,18 @@ import hasDifferentItems from 'Utilities/Object/hasDifferentItems'; import selectUniqueIds from 'Utilities/Object/selectUniqueIds'; import withCurrentPage from 'Components/withCurrentPage'; import * as historyActions from 'Store/Actions/historyActions'; -import { fetchAlbums, clearAlbums } from 'Store/Actions/albumActions'; -import { fetchTracks, clearTracks } from 'Store/Actions/trackActions'; +import { fetchBooks, clearBooks } from 'Store/Actions/bookActions'; import History from './History'; function createMapStateToProps() { return createSelector( (state) => state.history, - (state) => state.albums, - (state) => state.tracks, - (history, albums, tracks) => { + (state) => state.books, + (history, books) => { return { - isAlbumsFetching: albums.isFetching, - isAlbumsPopulated: albums.isPopulated, - albumsError: albums.error, - isTracksFetching: tracks.isFetching, - isTracksPopulated: tracks.isPopulated, - tracksError: tracks.error, + isBooksFetching: books.isFetching, + isBooksPopulated: books.isPopulated, + booksError: books.error, ...history }; } @@ -32,10 +27,8 @@ function createMapStateToProps() { const mapDispatchToProps = { ...historyActions, - fetchAlbums, - clearAlbums, - fetchTracks, - clearTracks + fetchBooks, + clearBooks }; class HistoryConnector extends Component { @@ -62,16 +55,10 @@ class HistoryConnector extends Component { componentDidUpdate(prevProps) { if (hasDifferentItems(prevProps.items, this.props.items)) { const bookIds = selectUniqueIds(this.props.items, 'bookId'); - const trackIds = selectUniqueIds(this.props.items, 'trackId'); if (bookIds.length) { - this.props.fetchAlbums({ bookIds }); + this.props.fetchBooks({ bookIds }); } else { - this.props.clearAlbums(); - } - if (trackIds.length) { - this.props.fetchTracks({ trackIds }); - } else { - this.props.clearTracks(); + this.props.clearBooks(); } } } @@ -79,8 +66,7 @@ class HistoryConnector extends Component { componentWillUnmount() { unregisterPagePopulator(this.repopulate); this.props.clearHistory(); - this.props.clearAlbums(); - this.props.clearTracks(); + this.props.clearBooks(); } // @@ -162,10 +148,8 @@ HistoryConnector.propTypes = { setHistoryFilter: PropTypes.func.isRequired, setHistoryTableOption: PropTypes.func.isRequired, clearHistory: PropTypes.func.isRequired, - fetchAlbums: PropTypes.func.isRequired, - clearAlbums: PropTypes.func.isRequired, - fetchTracks: PropTypes.func.isRequired, - clearTracks: PropTypes.func.isRequired + fetchBooks: PropTypes.func.isRequired, + clearBooks: PropTypes.func.isRequired }; export default withCurrentPage( diff --git a/frontend/src/Activity/History/HistoryEventTypeCell.js b/frontend/src/Activity/History/HistoryEventTypeCell.js index 4cdae037a..d63366104 100644 --- a/frontend/src/Activity/History/HistoryEventTypeCell.js +++ b/frontend/src/Activity/History/HistoryEventTypeCell.js @@ -9,19 +9,19 @@ function getIconName(eventType) { switch (eventType) { case 'grabbed': return icons.DOWNLOADING; - case 'artistFolderImported': + case 'authorFolderImported': return icons.DRIVE; - case 'trackFileImported': + case 'bookFileImported': return icons.DOWNLOADED; case 'downloadFailed': return icons.DOWNLOADING; - case 'trackFileDeleted': + case 'bookFileDeleted': return icons.DELETE; - case 'trackFileRenamed': + case 'bookFileRenamed': return icons.ORGANIZE; - case 'trackFileRetagged': + case 'bookFileRetagged': return icons.RETAG; - case 'albumImportIncomplete': + case 'bookImportIncomplete': return icons.DOWNLOADED; case 'downloadImported': return icons.DOWNLOADED; @@ -36,7 +36,7 @@ function getIconKind(eventType) { switch (eventType) { case 'downloadFailed': return kinds.DANGER; - case 'albumImportIncomplete': + case 'bookImportIncomplete': return kinds.WARNING; default: return kinds.DEFAULT; @@ -46,25 +46,25 @@ function getIconKind(eventType) { function getTooltip(eventType, data) { switch (eventType) { case 'grabbed': - return `Album grabbed from ${data.indexer} and sent to ${data.downloadClient}`; - case 'artistFolderImported': - return 'Track imported from artist folder'; - case 'trackFileImported': - return 'Track downloaded successfully and picked up from download client'; + return `Book grabbed from ${data.indexer} and sent to ${data.downloadClient}`; + case 'authorFolderImported': + return 'Book imported from author folder'; + case 'bookFileImported': + return 'Book downloaded successfully and picked up from download client'; case 'downloadFailed': - return 'Album download failed'; - case 'trackFileDeleted': - return 'Track file deleted'; - case 'trackFileRenamed': - return 'Track file renamed'; - case 'trackFileRetagged': - return 'Track file tags updated'; - case 'albumImportIncomplete': + return 'Book download failed'; + case 'bookFileDeleted': + return 'Book file deleted'; + case 'bookFileRenamed': + return 'Book file renamed'; + case 'bookFileRetagged': + return 'Book file tags updated'; + case 'bookImportIncomplete': return 'Files downloaded but not all could be imported'; case 'downloadImported': return 'Download completed and successfully imported'; case 'downloadIgnored': - return 'Album Download Ignored'; + return 'Book Download Ignored'; default: return 'Unknown event'; } diff --git a/frontend/src/Activity/History/HistoryRow.js b/frontend/src/Activity/History/HistoryRow.js index be970a5b4..94a4e3ccb 100644 --- a/frontend/src/Activity/History/HistoryRow.js +++ b/frontend/src/Activity/History/HistoryRow.js @@ -5,9 +5,9 @@ import IconButton from 'Components/Link/IconButton'; import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellConnector'; import TableRow from 'Components/Table/TableRow'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; -import AlbumTitleLink from 'Album/AlbumTitleLink'; -import TrackQuality from 'Album/TrackQuality'; -import ArtistNameLink from 'Artist/ArtistNameLink'; +import BookTitleLink from 'Book/BookTitleLink'; +import BookQuality from 'Book/BookQuality'; +import AuthorNameLink from 'Author/AuthorNameLink'; import HistoryEventTypeCell from './HistoryEventTypeCell'; import HistoryDetailsModal from './Details/HistoryDetailsModal'; import styles from './HistoryRow.css'; @@ -51,8 +51,8 @@ class HistoryRow extends Component { render() { const { - artist, - album, + author, + book, quality, qualityCutoffNotMet, eventType, @@ -66,7 +66,7 @@ class HistoryRow extends Component { onMarkAsFailedPress } = this.props; - if (!artist || !album) { + if (!author || !book) { return null; } @@ -96,9 +96,9 @@ class HistoryRow extends Component { if (name === 'authors.sortName') { return ( - ); @@ -107,10 +107,10 @@ class HistoryRow extends Component { if (name === 'books.title') { return ( - ); @@ -119,7 +119,7 @@ class HistoryRow extends Component { if (name === 'quality') { return ( - @@ -206,8 +206,8 @@ class HistoryRow extends Component { HistoryRow.propTypes = { bookId: PropTypes.number, - artist: PropTypes.object.isRequired, - album: PropTypes.object, + author: PropTypes.object.isRequired, + book: PropTypes.object, quality: PropTypes.object.isRequired, qualityCutoffNotMet: PropTypes.bool.isRequired, eventType: PropTypes.string.isRequired, diff --git a/frontend/src/Activity/History/HistoryRowConnector.js b/frontend/src/Activity/History/HistoryRowConnector.js index c1e70edff..224507d8c 100644 --- a/frontend/src/Activity/History/HistoryRowConnector.js +++ b/frontend/src/Activity/History/HistoryRowConnector.js @@ -3,23 +3,20 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { fetchHistory, markAsFailed } from 'Store/Actions/historyActions'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; -import createAlbumSelector from 'Store/Selectors/createAlbumSelector'; -import createTrackSelector from 'Store/Selectors/createTrackSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; +import createBookSelector from 'Store/Selectors/createBookSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import HistoryRow from './HistoryRow'; function createMapStateToProps() { return createSelector( - createArtistSelector(), - createAlbumSelector(), - createTrackSelector(), + createAuthorSelector(), + createBookSelector(), createUISettingsSelector(), - (artist, album, track, uiSettings) => { + (author, book, uiSettings) => { return { - artist, - album, - track, + author, + book, shortDateFormat: uiSettings.shortDateFormat, timeFormat: uiSettings.timeFormat }; diff --git a/frontend/src/Activity/Queue/Queue.js b/frontend/src/Activity/Queue/Queue.js index b41030cfe..c238ab3a4 100644 --- a/frontend/src/Activity/Queue/Queue.js +++ b/frontend/src/Activity/Queue/Queue.js @@ -42,7 +42,7 @@ class Queue extends Component { shouldComponentUpdate(nextProps) { // Don't update when fetching has completed if items have changed, - // before albums start fetching or when albums start fetching. + // before books start fetching or when books start fetching. if ( this.props.isFetching && @@ -53,7 +53,7 @@ class Queue extends Component { return false; } - if (!this.props.isAlbumsFetching && nextProps.isAlbumsFetching) { + if (!this.props.isBooksFetching && nextProps.isBooksFetching) { return false; } @@ -125,9 +125,9 @@ class Queue extends Component { isPopulated, error, items, - isAlbumsFetching, - isAlbumsPopulated, - albumsError, + isBooksFetching, + isBooksPopulated, + booksError, columns, totalRecords, isGrabbing, @@ -145,9 +145,9 @@ class Queue extends Component { isPendingSelected } = this.state; - const isRefreshing = isFetching || isAlbumsFetching || isRefreshMonitoredDownloadsExecuting; - const isAllPopulated = isPopulated && (isAlbumsPopulated || !items.length || items.every((e) => !e.bookId)); - const hasError = error || albumsError; + const isRefreshing = isFetching || isBooksFetching || isRefreshMonitoredDownloadsExecuting; + const isAllPopulated = isPopulated && (isBooksPopulated || !items.length || items.every((e) => !e.bookId)); + const hasError = error || booksError; const selectedIds = this.getSelectedIds(); const selectedCount = selectedIds.length; const disableSelectedActions = selectedCount === 0; @@ -280,9 +280,9 @@ Queue.propTypes = { isPopulated: PropTypes.bool.isRequired, error: PropTypes.object, items: PropTypes.arrayOf(PropTypes.object).isRequired, - isAlbumsFetching: PropTypes.bool.isRequired, - isAlbumsPopulated: PropTypes.bool.isRequired, - albumsError: PropTypes.object, + isBooksFetching: PropTypes.bool.isRequired, + isBooksPopulated: PropTypes.bool.isRequired, + booksError: PropTypes.object, columns: PropTypes.arrayOf(PropTypes.object).isRequired, totalRecords: PropTypes.number, isGrabbing: PropTypes.bool.isRequired, diff --git a/frontend/src/Activity/Queue/QueueConnector.js b/frontend/src/Activity/Queue/QueueConnector.js index f60d01377..e08adb565 100644 --- a/frontend/src/Activity/Queue/QueueConnector.js +++ b/frontend/src/Activity/Queue/QueueConnector.js @@ -9,21 +9,21 @@ import withCurrentPage from 'Components/withCurrentPage'; import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector'; import { executeCommand } from 'Store/Actions/commandActions'; import * as queueActions from 'Store/Actions/queueActions'; -import { fetchAlbums, clearAlbums } from 'Store/Actions/albumActions'; +import { fetchBooks, clearBooks } from 'Store/Actions/bookActions'; import * as commandNames from 'Commands/commandNames'; import Queue from './Queue'; function createMapStateToProps() { return createSelector( - (state) => state.albums, + (state) => state.books, (state) => state.queue.options, (state) => state.queue.paged, createCommandExecutingSelector(commandNames.REFRESH_MONITORED_DOWNLOADS), - (albums, options, queue, isRefreshMonitoredDownloadsExecuting) => { + (books, options, queue, isRefreshMonitoredDownloadsExecuting) => { return { - isAlbumsFetching: albums.isFetching, - isAlbumsPopulated: albums.isPopulated, - albumsError: albums.error, + isBooksFetching: books.isFetching, + isBooksPopulated: books.isPopulated, + booksError: books.error, isRefreshMonitoredDownloadsExecuting, ...options, ...queue @@ -34,8 +34,8 @@ function createMapStateToProps() { const mapDispatchToProps = { ...queueActions, - fetchAlbums, - clearAlbums, + fetchBooks, + clearBooks, executeCommand }; @@ -65,15 +65,15 @@ class QueueConnector extends Component { const bookIds = selectUniqueIds(this.props.items, 'bookId'); if (bookIds.length) { - this.props.fetchAlbums({ bookIds }); + this.props.fetchBooks({ bookIds }); } else { - this.props.clearAlbums(); + this.props.clearBooks(); } } if ( - this.props.includeUnknownArtistItems !== - prevProps.includeUnknownArtistItems + this.props.includeUnknownAuthorItems !== + prevProps.includeUnknownAuthorItems ) { this.repopulate(); } @@ -82,7 +82,7 @@ class QueueConnector extends Component { componentWillUnmount() { unregisterPagePopulator(this.repopulate); this.props.clearQueue(); - this.props.clearAlbums(); + this.props.clearBooks(); } // @@ -166,7 +166,7 @@ class QueueConnector extends Component { QueueConnector.propTypes = { useCurrentPage: PropTypes.bool.isRequired, items: PropTypes.arrayOf(PropTypes.object).isRequired, - includeUnknownArtistItems: PropTypes.bool.isRequired, + includeUnknownAuthorItems: PropTypes.bool.isRequired, fetchQueue: PropTypes.func.isRequired, gotoQueueFirstPage: PropTypes.func.isRequired, gotoQueuePreviousPage: PropTypes.func.isRequired, @@ -178,8 +178,8 @@ QueueConnector.propTypes = { clearQueue: PropTypes.func.isRequired, grabQueueItems: PropTypes.func.isRequired, removeQueueItems: PropTypes.func.isRequired, - fetchAlbums: PropTypes.func.isRequired, - clearAlbums: PropTypes.func.isRequired, + fetchBooks: PropTypes.func.isRequired, + clearBooks: PropTypes.func.isRequired, executeCommand: PropTypes.func.isRequired }; diff --git a/frontend/src/Activity/Queue/QueueDetails.js b/frontend/src/Activity/Queue/QueueDetails.js index 8256b8af3..8b1ed0fd4 100644 --- a/frontend/src/Activity/Queue/QueueDetails.js +++ b/frontend/src/Activity/Queue/QueueDetails.js @@ -76,7 +76,7 @@ function QueueDetails(props) { return ( ); } diff --git a/frontend/src/Activity/Queue/QueueOptions.js b/frontend/src/Activity/Queue/QueueOptions.js index dd4b391b1..f796cc4f4 100644 --- a/frontend/src/Activity/Queue/QueueOptions.js +++ b/frontend/src/Activity/Queue/QueueOptions.js @@ -14,18 +14,18 @@ class QueueOptions extends Component { super(props, context); this.state = { - includeUnknownArtistItems: props.includeUnknownArtistItems + includeUnknownAuthorItems: props.includeUnknownAuthorItems }; } componentDidUpdate(prevProps) { const { - includeUnknownArtistItems + includeUnknownAuthorItems } = this.props; - if (includeUnknownArtistItems !== prevProps.includeUnknownArtistItems) { + if (includeUnknownAuthorItems !== prevProps.includeUnknownAuthorItems) { this.setState({ - includeUnknownArtistItems + includeUnknownAuthorItems }); } } @@ -48,19 +48,19 @@ class QueueOptions extends Component { render() { const { - includeUnknownArtistItems + includeUnknownAuthorItems } = this.state; return ( - Show Unknown Artist Items + Show Unknown Author Items @@ -70,7 +70,7 @@ class QueueOptions extends Component { } QueueOptions.propTypes = { - includeUnknownArtistItems: PropTypes.bool.isRequired, + includeUnknownAuthorItems: PropTypes.bool.isRequired, onOptionChange: PropTypes.func.isRequired }; diff --git a/frontend/src/Activity/Queue/QueueRow.js b/frontend/src/Activity/Queue/QueueRow.js index 795c5868a..02423aed1 100644 --- a/frontend/src/Activity/Queue/QueueRow.js +++ b/frontend/src/Activity/Queue/QueueRow.js @@ -11,10 +11,10 @@ import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; import Icon from 'Components/Icon'; import Popover from 'Components/Tooltip/Popover'; import ProtocolLabel from 'Activity/Queue/ProtocolLabel'; -import AlbumTitleLink from 'Album/AlbumTitleLink'; -import TrackQuality from 'Album/TrackQuality'; +import BookTitleLink from 'Book/BookTitleLink'; +import BookQuality from 'Book/BookQuality'; import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal'; -import ArtistNameLink from 'Artist/ArtistNameLink'; +import AuthorNameLink from 'Author/AuthorNameLink'; import QueueStatusCell from './QueueStatusCell'; import TimeleftCell from './TimeleftCell'; import RemoveQueueItemModal from './RemoveQueueItemModal'; @@ -71,8 +71,8 @@ class QueueRow extends Component { trackedDownloadState, statusMessages, errorMessage, - artist, - album, + author, + book, quality, protocol, indexer, @@ -141,10 +141,10 @@ class QueueRow extends Component { return ( { - artist ? - : title } @@ -156,11 +156,11 @@ class QueueRow extends Component { return ( { - album ? - : '-' } @@ -169,11 +169,11 @@ class QueueRow extends Component { } if (name === 'books.releaseDate') { - if (album) { + if (book) { return ( ); } @@ -188,7 +188,7 @@ class QueueRow extends Component { if (name === 'quality') { return ( - @@ -335,7 +335,7 @@ class QueueRow extends Component { @@ -354,8 +354,8 @@ QueueRow.propTypes = { trackedDownloadState: PropTypes.string, statusMessages: PropTypes.arrayOf(PropTypes.object), errorMessage: PropTypes.string, - artist: PropTypes.object, - album: PropTypes.object, + author: PropTypes.object, + book: PropTypes.object, quality: PropTypes.object.isRequired, protocol: PropTypes.string.isRequired, indexer: PropTypes.string, diff --git a/frontend/src/Activity/Queue/QueueRowConnector.js b/frontend/src/Activity/Queue/QueueRowConnector.js index 4445ca88b..ad9e09849 100644 --- a/frontend/src/Activity/Queue/QueueRowConnector.js +++ b/frontend/src/Activity/Queue/QueueRowConnector.js @@ -4,25 +4,25 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { grabQueueItem, removeQueueItem } from 'Store/Actions/queueActions'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; -import createAlbumSelector from 'Store/Selectors/createAlbumSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; +import createBookSelector from 'Store/Selectors/createBookSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import QueueRow from './QueueRow'; function createMapStateToProps() { return createSelector( - createArtistSelector(), - createAlbumSelector(), + createAuthorSelector(), + createBookSelector(), createUISettingsSelector(), - (artist, album, uiSettings) => { + (author, book, uiSettings) => { const result = _.pick(uiSettings, [ 'showRelativeDates', 'shortDateFormat', 'timeFormat' ]); - result.artist = artist; - result.album = album; + result.author = author; + result.book = book; return result; } @@ -63,7 +63,7 @@ class QueueRowConnector extends Component { QueueRowConnector.propTypes = { id: PropTypes.number.isRequired, - album: PropTypes.object, + book: PropTypes.object, grabQueueItem: PropTypes.func.isRequired, removeQueueItem: PropTypes.func.isRequired }; diff --git a/frontend/src/Activity/Queue/Status/QueueStatusConnector.js b/frontend/src/Activity/Queue/Status/QueueStatusConnector.js index 090b8fc96..f93c66384 100644 --- a/frontend/src/Activity/Queue/Status/QueueStatusConnector.js +++ b/frontend/src/Activity/Queue/Status/QueueStatusConnector.js @@ -9,8 +9,8 @@ function createMapStateToProps() { return createSelector( (state) => state.app, (state) => state.queue.status, - (state) => state.queue.options.includeUnknownArtistItems, - (app, status, includeUnknownArtistItems) => { + (state) => state.queue.options.includeUnknownAuthorItems, + (app, status, includeUnknownAuthorItems) => { const { errors, warnings, @@ -25,9 +25,9 @@ function createMapStateToProps() { isReconnecting: app.isReconnecting, isPopulated: status.isPopulated, ...status.item, - count: includeUnknownArtistItems ? totalCount : count, - errors: includeUnknownArtistItems ? errors || unknownErrors : errors, - warnings: includeUnknownArtistItems ? warnings || unknownWarnings : warnings + count: includeUnknownAuthorItems ? totalCount : count, + errors: includeUnknownAuthorItems ? errors || unknownErrors : errors, + warnings: includeUnknownAuthorItems ? warnings || unknownWarnings : warnings }; } ); diff --git a/frontend/src/AddArtist/ArtistMetadataProfilePopoverContent.js b/frontend/src/AddAuthor/AuthorMetadataProfilePopoverContent.js similarity index 61% rename from frontend/src/AddArtist/ArtistMetadataProfilePopoverContent.js rename to frontend/src/AddAuthor/AuthorMetadataProfilePopoverContent.js index d7c663674..1a00e32a0 100644 --- a/frontend/src/AddArtist/ArtistMetadataProfilePopoverContent.js +++ b/frontend/src/AddAuthor/AuthorMetadataProfilePopoverContent.js @@ -1,6 +1,6 @@ import React from 'react'; -function ArtistMetadataProfilePopoverContent() { +function AuthorMetadataProfilePopoverContent() { return (
Select 'None' to only include items manually added via search or that match files on disk @@ -8,4 +8,4 @@ function ArtistMetadataProfilePopoverContent() { ); } -export default ArtistMetadataProfilePopoverContent; +export default AuthorMetadataProfilePopoverContent; diff --git a/frontend/src/AddArtist/ArtistMonitoringOptionsPopoverContent.js b/frontend/src/AddAuthor/AuthorMonitoringOptionsPopoverContent.js similarity index 91% rename from frontend/src/AddArtist/ArtistMonitoringOptionsPopoverContent.js rename to frontend/src/AddAuthor/AuthorMonitoringOptionsPopoverContent.js index 4ba3cd003..7f40f30cd 100644 --- a/frontend/src/AddArtist/ArtistMonitoringOptionsPopoverContent.js +++ b/frontend/src/AddAuthor/AuthorMonitoringOptionsPopoverContent.js @@ -2,7 +2,7 @@ import React from 'react'; import DescriptionList from 'Components/DescriptionList/DescriptionList'; import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem'; -function ArtistMonitoringOptionsPopoverContent() { +function AuthorMonitoringOptionsPopoverContent() { return ( state.albums.items.length, - (state) => state.albums.isFetching, - (state) => state.albums.isPopulated, - (length, isFetching, isPopulated) => { - const albumCount = (!isFetching && isPopulated) ? length : 0; - return { - albumCount, - isFetching, - isPopulated - }; - } - ); -} - -function createMapStateToProps() { - return createSelector( - createAlbumFetchStateSelector(), - createArtistClientSideCollectionItemsSelector('albumStudio'), - createDimensionsSelector(), - (albums, artist, dimensionsState) => { - const isPopulated = albums.isPopulated && artist.isPopulated; - const isFetching = artist.isFetching || albums.isFetching; - return { - ...artist, - isPopulated, - isFetching, - albumCount: albums.albumCount, - isSmallScreen: dimensionsState.isSmallScreen - }; - } - ); -} - -const mapDispatchToProps = { - fetchAlbums, - clearAlbums, - setAlbumStudioSort, - setAlbumStudioFilter, - saveAlbumStudio -}; - -class AlbumStudioConnector extends Component { - - // - // Lifecycle - - componentDidMount() { - this.populate(); - } - - componentWillUnmount() { - this.unpopulate(); - } - - // - // Control - - populate = () => { - this.props.fetchAlbums(); - } - - unpopulate = () => { - this.props.clearAlbums(); - } - - // - // Listeners - - onSortPress = (sortKey) => { - this.props.setAlbumStudioSort({ sortKey }); - } - - onFilterSelect = (selectedFilterKey) => { - this.props.setAlbumStudioFilter({ selectedFilterKey }); - } - - onUpdateSelectedPress = (payload) => { - this.props.saveAlbumStudio(payload); - } - - // - // Render - - render() { - return ( - - ); - } -} - -AlbumStudioConnector.propTypes = { - setAlbumStudioSort: PropTypes.func.isRequired, - setAlbumStudioFilter: PropTypes.func.isRequired, - fetchAlbums: PropTypes.func.isRequired, - clearAlbums: PropTypes.func.isRequired, - saveAlbumStudio: PropTypes.func.isRequired -}; - -export default connect(createMapStateToProps, mapDispatchToProps)(AlbumStudioConnector); diff --git a/frontend/src/AlbumStudio/AlbumStudioRowConnector.js b/frontend/src/AlbumStudio/AlbumStudioRowConnector.js deleted file mode 100644 index 44cdc42ce..000000000 --- a/frontend/src/AlbumStudio/AlbumStudioRowConnector.js +++ /dev/null @@ -1,94 +0,0 @@ -import _ from 'lodash'; -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; -import { toggleArtistMonitored } from 'Store/Actions/artistActions'; -import { toggleAlbumsMonitored } from 'Store/Actions/albumActions'; -import AlbumStudioRow from './AlbumStudioRow'; - -// Use a const to share the reselect cache between instances -const getAlbumMap = createSelector( - (state) => state.albums.items, - (albums) => { - return albums.reduce((acc, curr) => { - (acc[curr.authorId] = acc[curr.authorId] || []).push(curr); - return acc; - }, {}); - } -); - -function createMapStateToProps() { - return createSelector( - createArtistSelector(), - getAlbumMap, - (artist, albumMap) => { - const albumsInArtist = albumMap.hasOwnProperty(artist.id) ? albumMap[artist.id] : []; - const sortedAlbums = _.orderBy(albumsInArtist, 'releaseDate', 'desc'); - - return { - ...artist, - authorId: artist.id, - artistName: artist.artistName, - monitored: artist.monitored, - status: artist.status, - isSaving: artist.isSaving, - albums: sortedAlbums - }; - } - ); -} - -const mapDispatchToProps = { - toggleArtistMonitored, - toggleAlbumsMonitored -}; - -class AlbumStudioRowConnector extends Component { - - // - // Listeners - - onArtistMonitoredPress = () => { - const { - authorId, - monitored - } = this.props; - - this.props.toggleArtistMonitored({ - authorId, - monitored: !monitored - }); - } - - onAlbumMonitoredPress = (bookId, monitored) => { - const bookIds = [bookId]; - this.props.toggleAlbumsMonitored({ - bookIds, - monitored - }); - } - - // - // Render - - render() { - return ( - - ); - } -} - -AlbumStudioRowConnector.propTypes = { - authorId: PropTypes.number.isRequired, - monitored: PropTypes.bool.isRequired, - toggleArtistMonitored: PropTypes.func.isRequired, - toggleAlbumsMonitored: PropTypes.func.isRequired -}; - -export default connect(createMapStateToProps, mapDispatchToProps)(AlbumStudioRowConnector); diff --git a/frontend/src/App/AppRoutes.js b/frontend/src/App/AppRoutes.js index 81aaf096e..07d167990 100644 --- a/frontend/src/App/AppRoutes.js +++ b/frontend/src/App/AppRoutes.js @@ -4,13 +4,13 @@ import { Route, Redirect } from 'react-router-dom'; import getPathWithUrlBase from 'Utilities/getPathWithUrlBase'; import NotFound from 'Components/NotFound'; import Switch from 'Components/Router/Switch'; -import ArtistIndexConnector from 'Artist/Index/ArtistIndexConnector'; +import AuthorIndexConnector from 'Author/Index/AuthorIndexConnector'; import AddNewItemConnector from 'Search/AddNewItemConnector'; -import ArtistEditorConnector from 'Artist/Editor/ArtistEditorConnector'; -import AlbumStudioConnector from 'AlbumStudio/AlbumStudioConnector'; +import AuthorEditorConnector from 'Author/Editor/AuthorEditorConnector'; +import BookshelfConnector from 'Bookshelf/BookshelfConnector'; import UnmappedFilesTableConnector from 'UnmappedFiles/UnmappedFilesTableConnector'; -import ArtistDetailsPageConnector from 'Artist/Details/ArtistDetailsPageConnector'; -import AlbumDetailsPageConnector from 'Album/Details/AlbumDetailsPageConnector'; +import AuthorDetailsPageConnector from 'Author/Details/AuthorDetailsPageConnector'; +import BookDetailsPageConnector from 'Book/Details/BookDetailsPageConnector'; import CalendarPageConnector from 'Calendar/CalendarPageConnector'; import HistoryConnector from 'Activity/History/HistoryConnector'; import QueueConnector from 'Activity/Queue/QueueConnector'; @@ -44,13 +44,13 @@ function AppRoutes(props) { return ( {/* - Artist + Author */} { @@ -76,13 +76,13 @@ function AppRoutes(props) { /> {/* diff --git a/frontend/src/Artist/Details/AlbumRowConnector.js b/frontend/src/Artist/Details/AlbumRowConnector.js deleted file mode 100644 index d93cec6a6..000000000 --- a/frontend/src/Artist/Details/AlbumRowConnector.js +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint max-params: 0 */ -import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; -import createTrackFileSelector from 'Store/Selectors/createTrackFileSelector'; -import AlbumRow from './AlbumRow'; - -function createMapStateToProps() { - return createSelector( - createArtistSelector(), - createTrackFileSelector(), - (artist = {}, trackFile) => { - return { - artistMonitored: artist.monitored, - trackFilePath: trackFile ? trackFile.path : null - }; - } - ); -} -export default connect(createMapStateToProps)(AlbumRow); diff --git a/frontend/src/Artist/Editor/ArtistEditorRow.css b/frontend/src/Artist/Editor/ArtistEditorRow.css deleted file mode 100644 index aeb9776ca..000000000 --- a/frontend/src/Artist/Editor/ArtistEditorRow.css +++ /dev/null @@ -1,5 +0,0 @@ -.albumFolder { - composes: cell from '~Components/Table/Cells/TableRowCell.css'; - - width: 150px; -} diff --git a/frontend/src/Artist/History/ArtistHistoryTable.js b/frontend/src/Artist/History/ArtistHistoryTable.js deleted file mode 100644 index 4709c35c1..000000000 --- a/frontend/src/Artist/History/ArtistHistoryTable.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import ArtistHistoryContentConnector from 'Artist/History/ArtistHistoryContentConnector'; -import ArtistHistoryTableContent from 'Artist/History/ArtistHistoryTableContent'; - -function ArtistHistoryTable(props) { - const { - ...otherProps - } = props; - - return ( - - ); -} - -ArtistHistoryTable.propTypes = { -}; - -export default ArtistHistoryTable; diff --git a/frontend/src/Artist/Index/Table/ArtistIndexActionsCell.js b/frontend/src/Artist/Index/Table/ArtistIndexActionsCell.js deleted file mode 100644 index 768cb9d29..000000000 --- a/frontend/src/Artist/Index/Table/ArtistIndexActionsCell.js +++ /dev/null @@ -1,102 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import { icons } from 'Helpers/Props'; -import IconButton from 'Components/Link/IconButton'; -import SpinnerIconButton from 'Components/Link/SpinnerIconButton'; -import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell'; -import EditArtistModalConnector from 'Artist/Edit/EditArtistModalConnector'; -import DeleteArtistModal from 'Artist/Delete/DeleteArtistModal'; - -class ArtistIndexActionsCell extends Component { - - // - // Lifecycle - - constructor(props, context) { - super(props, context); - - this.state = { - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: false - }; - } - - // - // Listeners - - onEditArtistPress = () => { - this.setState({ isEditArtistModalOpen: true }); - } - - onEditArtistModalClose = () => { - this.setState({ isEditArtistModalOpen: false }); - } - - onDeleteArtistPress = () => { - this.setState({ - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: true - }); - } - - onDeleteArtistModalClose = () => { - this.setState({ isDeleteArtistModalOpen: false }); - } - - // - // Render - - render() { - const { - id, - isRefreshingArtist, - onRefreshArtistPress, - ...otherProps - } = this.props; - - const { - isEditArtistModalOpen, - isDeleteArtistModalOpen - } = this.state; - - return ( - - - - - - - - - - ); - } -} - -ArtistIndexActionsCell.propTypes = { - id: PropTypes.number.isRequired, - isRefreshingArtist: PropTypes.bool.isRequired, - onRefreshArtistPress: PropTypes.func.isRequired -}; - -export default ArtistIndexActionsCell; diff --git a/frontend/src/Artist/Index/Table/ArtistIndexHeaderConnector.js b/frontend/src/Artist/Index/Table/ArtistIndexHeaderConnector.js deleted file mode 100644 index 37ddd9ef3..000000000 --- a/frontend/src/Artist/Index/Table/ArtistIndexHeaderConnector.js +++ /dev/null @@ -1,13 +0,0 @@ -import { connect } from 'react-redux'; -import { setArtistTableOption } from 'Store/Actions/artistIndexActions'; -import ArtistIndexHeader from './ArtistIndexHeader'; - -function createMapDispatchToProps(dispatch, props) { - return { - onTableOptionChange(payload) { - dispatch(setArtistTableOption(payload)); - } - }; -} - -export default connect(undefined, createMapDispatchToProps)(ArtistIndexHeader); diff --git a/frontend/src/Artist/ArtistBanner.js b/frontend/src/Author/AuthorBanner.js similarity index 94% rename from frontend/src/Artist/ArtistBanner.js rename to frontend/src/Author/AuthorBanner.js index b409667b1..ef249926d 100644 --- a/frontend/src/Artist/ArtistBanner.js +++ b/frontend/src/Author/AuthorBanner.js @@ -1,12 +1,12 @@ import PropTypes from 'prop-types'; import React from 'react'; -import ArtistImage from './ArtistImage'; +import AuthorImage from './AuthorImage'; const bannerPlaceholder = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAC5AgMAAADG9/24AAAADFBMVEUyMjI7Ozs1NTU4ODjgOsZvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QkRBgAc5PUQ8QAAB7tJREFUeNrtnb1rHEsMwMdjArtrUrpf3uMg2cOl+5QpXWRvjQkXlyHVK8MVYXFl3F+/GAzrNfdSuXkQnH9ie/Oqw32aFM6bkTQfd85rHrwi0qjJJql+pxlJo9FISv0XqX8mKkmSJEmSJEmSJEmSJEmSJEmS5NeVYrh7HDqJ5DeY23kQB64/u7zW91amzgXqvRqjfGYvarnfxqncuaQlf72Zxv4gSOluudOfjRy1Hzh1L+nPj+KU3jh0MWr3Sp87dDFq98An/msmg3zPW/aFR6/vRaBPglML6Mci0H0g92MYfrjvRgJ5TrDvhuFyGIZv9NdTOev93dDry1Z59mM56/2hU8WZcefFjZgVT/Z90SlEV9VKio3HeKYZLLSGII6WPP+oBv3ZwkL3iE4JG/ZRjUYb16mAripUO/c4Hl3bd/juCF19FuHeJn6nK90VBh0s3SjBvcFW/wTrvfBa118EbHY8qmMOtmgdupoKOLTvAmOH1k059LKAX+Qra/TncExH4hcBXV3Zf/+Dv5Vb43cfod/wt3PLsN5VF6HDiudt56IbB23Ql5/oZ8A7CfZWbgF61sap62XdlOZTZ2rF3c7ltNW1+f7LuDez/uc6uDfO8dwkbPXcKF8vPS9sds527pC2utH0uCb0Jmz2t8wNvN3q2jj4ntDJna94m3g4sb7HH8Gue0RH4Je8z61g4GGr79Wz1qHjbi94m/jcH1IOccsj+lt/sOFr4m0EPz+3XyNueURvSmfn+Ebx1rctMvOxU8foqOwVa+9mfdvHDH+DdYQOxAesvZslvc/wo4vQZy6eY+vdrCVrut/AyTW9CWvO3E1ra4L6i5Fxoka7MDan45vTOmx2MPGc0QH52Tb6kTPxXNGtW5/Tnl+oGP2N/dstY8eeO2M+bqM3zvVxRT+gS8Vdl5/z6CaCzfx/c41o3pP2+030UzrAHDNGv8d4FvMVAf1I4c07V/QlnNsyG9TN23ID/ZjObnO+6CZmydS+y8oG9Dfk2Gd80WcW3Rv44e5bZOLtD8EUHbRq0V0F/DAMn8fQ2UUv2UayEMxplaFvM0G7QR/ufqBcmH/gG85Z9BM8rMO5bdiUDu4ceaLvUjqWfJveQm8hpvnKFv1jOLxUTtkoBWf0nIK5Cd6wO207dAznTlmjH+K630KvuKPbOHYffJsOexykx0iWJ7pNRf+ttEXvW1U49F7ZbJ26RHSe6ehn5NRGMPBVQAfP12EQf8QZPTMxXac30M1RxtaWXLBFn3j0eRsHNIBuCycLtqfWCQZrBcZ0W+gVhXts0RtEXyit4zDOoE/N/5yNzNF3oVB0A93I6ise7bijr1XwbYiurySg7xjfpp+g375mjj5D9HYD3fr6YvkKcxU80Q8duvVt2+gjob/ljX7yFH1a80dvDfpia8GXqp3Wr1XJXevljvFt2QZ6a6tJ2Gvd2Pa8Xuu2iNB7o++r+lUJlQas93oOl04be73Ut7y1Ts4tn/0EfaxZOzcKaXIsqNiI4QtE5x7N7Z08RZ9CKpb38cWs9V26b4sDWURnr3W9foq+gpM8a3S4V+rhKUCcqrBXTufMUxU2QWUTkFtZGls3pjgnqJ4FdB1lZAd8/qMEZGRtAlJvJqONb2syzuj2CuK+1YU5reg2CzGNyqq6fpOpku8VRI7lchX+7SIy8NdQSaKn3K8bsWJOlZGBX2Ed0bUIdBXftJpzG1h2vjetWFqgHXrhczTWtx2h8llXVTytI4FHnaes0bGMqNhC1+jUXmFMx7iCaq6qy4HqxR7dFfMUtc34LQCVDPppcM13Kie5RmTGJYNUKBraDL57xEKalS0UzTgXiiqn1X3fRxR0bBf6TLEvD4aKkslTdO5F4fQUIHseo5ugfrShewbWjvsriHxT65WAByAHVCT7u0fvoKDC+rZClZyf/eSAngUTj1pfCXjshU/8smDiPTr7J374sDPDfI1Hd4cX1g874TmvRc+30U8V9+e88Ig7U6V26Ofk21rzg1ScH3Hj033bTXIZab2iGG6PdWOaQzLx7cShQ0FFfdxqlfFu2DAhxw4vf5zWV3hYZ96m47l7u0+DMAgdu1Dxbs4St+Rx6MbAwzIveLfk8Y2Y9J5HP1tij3DmjZii9lujQy9GXO/M22/5pmvUVdWiV3RkYd50zbfaI7Vb9GmDD0C4t9qLGiy+JPTVKT4A4d5gMY866N4i+p9KuUM767aavpkqLnmDDl10S8W/mSq20O3I3n8x6AXufP4tdKlxcpkZ4HN43FZ0mT3GCmicTO2ysW2uVXmFWp/yb5cdN0kHrb/ADwFN0uPW+ICOt+0SWuPjkW2tPTr+CjcSphjiGIzWodPQGwljMGj4Se/Q0bfJGH4Sj7zx6DJG3tCgo4HQoYiukDHoKB5vZdCtb9MrIUM7DyK169Zu+mEUMtQsjLJrtT7vWl2IGWXnBxjaFwFnraQBhmFs5dDqi66SNLYyGlY6XMgaVip4RG00mHh2LWwwcRhHPVsJG0cdhpDProQNIQ+j52e30kbPa19B5T64H9Wfqn0mTelB7Y04pWMFfCQf5JDTjYOTuSClu5QUSa9EyU0gf5BF7iaP2zxdq6TJjUydgxTD3aPvm5wkSZIkSZIkSZIkSZIkSZIk+Z9kv/534U2+Uyf0XwP9H83PZBlAqkdjAAAAAElFTkSuQmCC'; -function ArtistBanner(props) { +function AuthorBanner(props) { return ( - - {artistName} + {authorName} ); } -ArtistNameLink.propTypes = { +AuthorNameLink.propTypes = { titleSlug: PropTypes.string.isRequired, - artistName: PropTypes.string.isRequired + authorName: PropTypes.string.isRequired }; -export default ArtistNameLink; +export default AuthorNameLink; diff --git a/frontend/src/Artist/ArtistPoster.js b/frontend/src/Author/AuthorPoster.js similarity index 91% rename from frontend/src/Artist/ArtistPoster.js rename to frontend/src/Author/AuthorPoster.js index e830d93ba..e9253b85a 100644 --- a/frontend/src/Artist/ArtistPoster.js +++ b/frontend/src/Author/AuthorPoster.js @@ -1,12 +1,12 @@ import PropTypes from 'prop-types'; import React from 'react'; -import ArtistImage from './ArtistImage'; +import AuthorImage from './AuthorImage'; const posterPlaceholder = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPcAAAD3AQMAAAD7QlAQAAAABlBMVEUnJychISEIs8G4AAAEFklEQVRYw+2YMdPOQBDH95KQDEVSMKOj1FFQJx9BQc0nkeuUvoLS+AQ6MQqlRu8xCjpUgsjK7iXz2t1LMsbo8i/ey5vfc3e7m7tk9+DQoUOHDpGe3bu7hS8BwJ117BoAOLfOb/Hf62s4EY1VNrcPVvjNua1WuJ/b8xqoeR3sqFkllx8+AYAra9PniDg1ydr07cT7FQMy6k7ycQMKgJr5F4BrhvI9ZA3xCDU8fJggs9gBXJ35acX8lil74CPmO5w1xhwoIMVFMQcqKCfynH3soLLuEfkB4O5TBArDPZlH05ZkYMxBigyJDEyseylHFjjK4CzPyS4IE3gTgIxuAyulHzbG/as0PYsifM24X8/TA19Vxn2efjagNwFoHE2/GDAKpm86HE2AfMrmLQbqADnI2bzFQPv8y7NlM7naORU+uid+62X4xJg0V6PC1+KfvvSghWMgnh0cVIArCO694Ib+qWR4HQ257F9oRxu+L2FpzK3h7D5vPwqA5k1OPOwA4iaAOYWnZM4XPhPYT3eWDXriX4sHROjpskF7cC2eBHfUdVjeDw6/4Uk9oHqEz18DH9se8IvgCdQDBS/oLUxcPcB24mnAv+jfXvCMOdwI9jNXDxiJp9w9DCd4Afgdz96fF5GGk3xSCFBHw+gF4PAz9SQCwE7K5UGculJHGuTdKPun+IYHrafAUPfPKJdP4OhL7ErDuf9jfnXn6Gu6+Kj654EPKQIG7iu5PMLacGPO7Qf0EOMvx3LhhRh/5l+GOsahnPkw4Mw7sXzLedzxV+DvscsMZ8X51W0Olp/+5P7qIPlLPMEWP+3z5G94rXinuen/RWzAbe6g7hVvRX/DO8FdjMPB9+O3yD5fwf1fc72+/jcfN/cHRPZPJva/7q/27z9zlPyVfL9Abrgv/oW/Nvyx5vL9rbl5f78R/I3iTnP7fRH83QjVDpfCb4Kr71uxz1FzkN9nxfX32XKVHyj+BfweV/mJkM5Pdnkpsc6PfK64BynDM8lTiU1+l+LPP2iLUJj8sj5z3uaXgMPZFDY/rQDHs/rLTRxMfkwx4mX4hPLjaza/TgIfI/l1xvl5y/wT5+dSCd8rmXf8W2/qgx5S5rRYvAMlri+Ic2MKME9FCdQT/wJ8Ga1vSnzE+Z3l06REJi7qI1VfOXw0xusrCPVZ+6aP12dFqO/qN6d4fZeF+rB804X6sInXl/lrT1vBFtAu1KcuCfWpi9e33VLfJjZAS33ckvlZpH4uedu2nOcWhleiPr9peLFT32fyfGD7fMGBlf/jfCLZOd8oIrw6q4/o2jogzlc2z2fAW8w2nwvd3eqp0YXxCcdiS1HzRC8fw2ezJjvHVtn2tPbhqnOzTgNp1/kdv6pV7ig4RQOruuDBCax1+94dOHTo0KFDk34DoJynpPus3GIAAAAASUVORK5CYII='; -function ArtistPoster(props) { +function AuthorPoster(props) { return ( - - @@ -25,9 +25,9 @@ function DeleteArtistModal(props) { ); } -DeleteArtistModal.propTypes = { +DeleteAuthorModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default DeleteArtistModal; +export default DeleteAuthorModal; diff --git a/frontend/src/Album/Delete/DeleteAlbumModalContent.css b/frontend/src/Author/Delete/DeleteAuthorModalContent.css similarity index 100% rename from frontend/src/Album/Delete/DeleteAlbumModalContent.css rename to frontend/src/Author/Delete/DeleteAuthorModalContent.css diff --git a/frontend/src/Artist/Delete/DeleteArtistModalContent.js b/frontend/src/Author/Delete/DeleteAuthorModalContent.js similarity index 77% rename from frontend/src/Artist/Delete/DeleteArtistModalContent.js rename to frontend/src/Author/Delete/DeleteAuthorModalContent.js index fe32e25aa..68f7f91b8 100644 --- a/frontend/src/Artist/Delete/DeleteArtistModalContent.js +++ b/frontend/src/Author/Delete/DeleteAuthorModalContent.js @@ -11,9 +11,9 @@ 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 styles from './DeleteArtistModalContent.css'; +import styles from './DeleteAuthorModalContent.css'; -class DeleteArtistModalContent extends Component { +class DeleteAuthorModalContent extends Component { // // Lifecycle @@ -38,7 +38,7 @@ class DeleteArtistModalContent extends Component { this.setState({ addImportListExclusion: value }); } - onDeleteArtistConfirmed = () => { + onDeleteAuthorConfirmed = () => { const deleteFiles = this.state.deleteFiles; const addImportListExclusion = this.state.addImportListExclusion; @@ -52,26 +52,26 @@ class DeleteArtistModalContent extends Component { render() { const { - artistName, + authorName, path, statistics, onModalClose } = this.props; const { - trackFileCount, + bookFileCount, sizeOnDisk } = statistics; const deleteFiles = this.state.deleteFiles; const addImportListExclusion = this.state.addImportListExclusion; - let deleteFilesLabel = `Delete ${trackFileCount} Track Files`; - let deleteFilesHelpText = 'Delete the track files and artist folder'; + let deleteFilesLabel = `Delete ${bookFileCount} Book Files`; + let deleteFilesHelpText = 'Delete the book files and author folder'; - if (trackFileCount === 0) { - deleteFilesLabel = 'Delete Artist Folder'; - deleteFilesHelpText = 'Delete the artist folder and its contents'; + if (bookFileCount === 0) { + deleteFilesLabel = 'Delete Author Folder'; + deleteFilesHelpText = 'Delete the author folder and its contents'; } return ( @@ -79,7 +79,7 @@ class DeleteArtistModalContent extends Component { onModalClose={onModalClose} > - Delete - {artistName} + Delete - {authorName} @@ -112,7 +112,7 @@ class DeleteArtistModalContent extends Component { type={inputTypes.CHECK} name="addImportListExclusion" value={addImportListExclusion} - helpText="Prevent artist from being added to Readarr by Import lists" + helpText="Prevent author from being added to Readarr by Import lists" kind={kinds.DANGER} onChange={this.onAddImportListExclusionChange} /> @@ -121,11 +121,11 @@ class DeleteArtistModalContent extends Component { { deleteFiles &&
-
The artist folder {path} and all of its content will be deleted.
+
The author folder {path} and all of its content will be deleted.
{ - !!trackFileCount && -
{trackFileCount} track files totaling {formatBytes(sizeOnDisk)}
+ !!bookFileCount && +
{bookFileCount} book files totaling {formatBytes(sizeOnDisk)}
}
} @@ -139,7 +139,7 @@ class DeleteArtistModalContent extends Component { @@ -149,18 +149,18 @@ class DeleteArtistModalContent extends Component { } } -DeleteArtistModalContent.propTypes = { - artistName: PropTypes.string.isRequired, +DeleteAuthorModalContent.propTypes = { + authorName: PropTypes.string.isRequired, path: PropTypes.string.isRequired, statistics: PropTypes.object.isRequired, onDeletePress: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; -DeleteArtistModalContent.defaultProps = { +DeleteAuthorModalContent.defaultProps = { statistics: { - trackFileCount: 0 + bookFileCount: 0 } }; -export default DeleteArtistModalContent; +export default DeleteAuthorModalContent; diff --git a/frontend/src/Artist/Delete/DeleteArtistModalContentConnector.js b/frontend/src/Author/Delete/DeleteAuthorModalContentConnector.js similarity index 59% rename from frontend/src/Artist/Delete/DeleteArtistModalContentConnector.js rename to frontend/src/Author/Delete/DeleteAuthorModalContentConnector.js index 1632a57fa..4037cfbfe 100644 --- a/frontend/src/Artist/Delete/DeleteArtistModalContentConnector.js +++ b/frontend/src/Author/Delete/DeleteAuthorModalContentConnector.js @@ -2,30 +2,30 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; -import { deleteArtist } from 'Store/Actions/artistActions'; -import DeleteArtistModalContent from './DeleteArtistModalContent'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; +import { deleteAuthor } from 'Store/Actions/authorActions'; +import DeleteAuthorModalContent from './DeleteAuthorModalContent'; function createMapStateToProps() { return createSelector( - createArtistSelector(), - (artist) => { - return artist; + createAuthorSelector(), + (author) => { + return author; } ); } const mapDispatchToProps = { - deleteArtist + deleteAuthor }; -class DeleteArtistModalContentConnector extends Component { +class DeleteAuthorModalContentConnector extends Component { // // Listeners onDeletePress = (deleteFiles, addImportListExclusion) => { - this.props.deleteArtist({ + this.props.deleteAuthor({ id: this.props.authorId, deleteFiles, addImportListExclusion @@ -39,7 +39,7 @@ class DeleteArtistModalContentConnector extends Component { render() { return ( - @@ -47,10 +47,10 @@ class DeleteArtistModalContentConnector extends Component { } } -DeleteArtistModalContentConnector.propTypes = { +DeleteAuthorModalContentConnector.propTypes = { authorId: PropTypes.number.isRequired, onModalClose: PropTypes.func.isRequired, - deleteArtist: PropTypes.func.isRequired + deleteAuthor: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(DeleteArtistModalContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(DeleteAuthorModalContentConnector); diff --git a/frontend/src/Artist/Details/ArtistAlternateTitles.css b/frontend/src/Author/Details/AuthorAlternateTitles.css similarity index 100% rename from frontend/src/Artist/Details/ArtistAlternateTitles.css rename to frontend/src/Author/Details/AuthorAlternateTitles.css diff --git a/frontend/src/Artist/Details/ArtistAlternateTitles.js b/frontend/src/Author/Details/AuthorAlternateTitles.js similarity index 71% rename from frontend/src/Artist/Details/ArtistAlternateTitles.js rename to frontend/src/Author/Details/AuthorAlternateTitles.js index e1fde52e6..00d4567c7 100644 --- a/frontend/src/Artist/Details/ArtistAlternateTitles.js +++ b/frontend/src/Author/Details/AuthorAlternateTitles.js @@ -1,8 +1,8 @@ import PropTypes from 'prop-types'; import React from 'react'; -import styles from './ArtistAlternateTitles.css'; +import styles from './AuthorAlternateTitles.css'; -function ArtistAlternateTitles({ alternateTitles }) { +function AuthorAlternateTitles({ alternateTitles }) { return (
    { @@ -21,8 +21,8 @@ function ArtistAlternateTitles({ alternateTitles }) { ); } -ArtistAlternateTitles.propTypes = { +AuthorAlternateTitles.propTypes = { alternateTitles: PropTypes.arrayOf(PropTypes.string).isRequired }; -export default ArtistAlternateTitles; +export default AuthorAlternateTitles; diff --git a/frontend/src/Artist/Details/ArtistDetails.css b/frontend/src/Author/Details/AuthorDetails.css similarity index 98% rename from frontend/src/Artist/Details/ArtistDetails.css rename to frontend/src/Author/Details/AuthorDetails.css index 3d572e40c..a66f73216 100644 --- a/frontend/src/Artist/Details/ArtistDetails.css +++ b/frontend/src/Author/Details/AuthorDetails.css @@ -99,11 +99,11 @@ float: right; } -.artistNavigationButtons { +.authorNavigationButtons { white-space: nowrap; } -.artistNavigationButton { +.authorNavigationButton { composes: button from '~Components/Link/IconButton.css'; margin-left: 5px; diff --git a/frontend/src/Artist/Details/ArtistDetails.js b/frontend/src/Author/Details/AuthorDetails.js similarity index 80% rename from frontend/src/Artist/Details/ArtistDetails.js rename to frontend/src/Author/Details/AuthorDetails.js index d31224da5..a212979cf 100644 --- a/frontend/src/Artist/Details/ArtistDetails.js +++ b/frontend/src/Author/Details/AuthorDetails.js @@ -1,7 +1,7 @@ import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +import { Tab, TabList, TabPanel, Tabs } from 'react-tabs'; import TextTruncate from 'react-text-truncate'; import formatBytes from 'Utilities/Number/formatBytes'; import selectAll from 'Utilities/Table/selectAll'; @@ -22,20 +22,20 @@ import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator'; import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton'; import Popover from 'Components/Tooltip/Popover'; import Tooltip from 'Components/Tooltip/Tooltip'; -import TrackFileEditorTable from 'TrackFile/Editor/TrackFileEditorTable'; +import BookFileEditorTable from 'BookFile/Editor/BookFileEditorTable'; import OrganizePreviewModalConnector from 'Organize/OrganizePreviewModalConnector'; import RetagPreviewModalConnector from 'Retag/RetagPreviewModalConnector'; import QualityProfileNameConnector from 'Settings/Profiles/Quality/QualityProfileNameConnector'; -import ArtistPoster from 'Artist/ArtistPoster'; -import EditArtistModalConnector from 'Artist/Edit/EditArtistModalConnector'; -import DeleteArtistModal from 'Artist/Delete/DeleteArtistModal'; -import ArtistHistoryTable from 'Artist/History/ArtistHistoryTable'; -import ArtistAlternateTitles from './ArtistAlternateTitles'; -import ArtistDetailsSeasonConnector from './ArtistDetailsSeasonConnector'; +import AuthorPoster from 'Author/AuthorPoster'; +import EditAuthorModalConnector from 'Author/Edit/EditAuthorModalConnector'; +import DeleteAuthorModal from 'Author/Delete/DeleteAuthorModal'; +import AuthorHistoryTable from 'Author/History/AuthorHistoryTable'; +import AuthorAlternateTitles from './AuthorAlternateTitles'; +import AuthorDetailsSeasonConnector from './AuthorDetailsSeasonConnector'; import AuthorDetailsSeriesConnector from './AuthorDetailsSeriesConnector'; -import ArtistTagsConnector from './ArtistTagsConnector'; -import ArtistDetailsLinks from './ArtistDetailsLinks'; -import styles from './ArtistDetails.css'; +import AuthorTagsConnector from './AuthorTagsConnector'; +import AuthorDetailsLinks from './AuthorDetailsLinks'; +import styles from './AuthorDetails.css'; import InteractiveSearchTable from 'InteractiveSearch/InteractiveSearchTable'; import InteractiveSearchFilterMenuConnector from 'InteractiveSearch/InteractiveSearchFilterMenuConnector'; import InteractiveImportModal from '../../InteractiveImport/InteractiveImportModal'; @@ -60,7 +60,7 @@ function getExpandedState(newState) { }; } -class ArtistDetails extends Component { +class AuthorDetails extends Component { // // Lifecycle @@ -71,8 +71,8 @@ class ArtistDetails extends Component { this.state = { isOrganizeModalOpen: false, isRetagModalOpen: false, - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: false, + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: false, isInteractiveImportModalOpen: false, allExpanded: false, allCollapsed: false, @@ -108,23 +108,23 @@ class ArtistDetails extends Component { this.setState({ isInteractiveImportModalOpen: false }); } - onEditArtistPress = () => { - this.setState({ isEditArtistModalOpen: true }); + onEditAuthorPress = () => { + this.setState({ isEditAuthorModalOpen: true }); } - onEditArtistModalClose = () => { - this.setState({ isEditArtistModalOpen: false }); + onEditAuthorModalClose = () => { + this.setState({ isEditAuthorModalOpen: false }); } - onDeleteArtistPress = () => { + onDeleteAuthorPress = () => { this.setState({ - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: true + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: true }); } - onDeleteArtistModalClose = () => { - this.setState({ isDeleteArtistModalOpen: false }); + onDeleteAuthorModalClose = () => { + this.setState({ isDeleteAuthorModalOpen: false }); } onExpandAllPress = () => { @@ -156,7 +156,7 @@ class ArtistDetails extends Component { render() { const { id, - artistName, + authorName, ratings, path, statistics, @@ -166,7 +166,7 @@ class ArtistDetails extends Component { overview, links, images, - artistType, + authorType, alternateTitles, tags, isSaving, @@ -174,30 +174,30 @@ class ArtistDetails extends Component { isSearching, isFetching, isPopulated, - albumsError, - trackFilesError, - hasAlbums, - hasMonitoredAlbums, + booksError, + bookFilesError, + hasBooks, + hasMonitoredBooks, hasSeries, series, - hasTrackFiles, - previousArtist, - nextArtist, + hasBookFiles, + previousAuthor, + nextAuthor, onMonitorTogglePress, onRefreshPress, onSearchPress } = this.props; const { - trackFileCount, + bookFileCount, sizeOnDisk } = statistics; const { isOrganizeModalOpen, isRetagModalOpen, - isEditArtistModalOpen, - isDeleteArtistModalOpen, + isEditAuthorModalOpen, + isDeleteAuthorModalOpen, isInteractiveImportModalOpen, allExpanded, allCollapsed, @@ -206,14 +206,14 @@ class ArtistDetails extends Component { } = this.state; const continuing = status === 'continuing'; - const endedString = artistType === 'Person' ? 'Deceased' : 'Ended'; + const endedString = authorType === 'Person' ? 'Deceased' : 'Ended'; - let trackFilesCountMessage = 'No track files'; + let bookFilesCountMessage = 'No book files'; - if (trackFileCount === 1) { - trackFilesCountMessage = '1 track file'; - } else if (trackFileCount > 1) { - trackFilesCountMessage = `${trackFileCount} track files`; + if (bookFileCount === 1) { + bookFilesCountMessage = '1 book file'; + } else if (bookFileCount > 1) { + bookFilesCountMessage = `${bookFileCount} book files`; } let expandIcon = icons.EXPAND_INDETERMINATE; @@ -225,7 +225,7 @@ class ArtistDetails extends Component { } return ( - + @@ -251,14 +251,14 @@ class ArtistDetails extends Component { {/* */} @@ -273,13 +273,13 @@ class ArtistDetails extends Component { @@ -304,7 +304,7 @@ class ArtistDetails extends Component {
-
- {artistName} + {authorName}
{ @@ -339,36 +339,36 @@ class ArtistDetails extends Component { /> } title="Alternate Titles" - body={} + body={} position={tooltipPositions.BOTTOM} />
}
-
+
@@ -399,7 +399,7 @@ class ArtistDetails extends Component { } tooltip={ - } @@ -505,7 +505,7 @@ class ArtistDetails extends Component { } - tooltip={} + tooltip={} kind={kinds.INVERSE} position={tooltipPositions.BOTTOM} /> @@ -524,18 +524,18 @@ class ArtistDetails extends Component {
{ - !isPopulated && !albumsError && !trackFilesError && + !isPopulated && !booksError && !bookFilesError && } { - !isFetching && albumsError && -
Loading albums failed
+ !isFetching && booksError && +
Loading books failed
} { - !isFetching && trackFilesError && -
Loading track files failed
+ !isFetching && bookFilesError && +
Loading book files failed
} { @@ -583,14 +583,14 @@ class ArtistDetails extends Component { selectedTabIndex === 3 &&
} - - - @@ -645,7 +645,7 @@ class ArtistDetails extends Component { Missing or too many books? Modify or create a new Metadata Profile or manually - Search + Search for new items!
@@ -661,23 +661,23 @@ class ArtistDetails extends Component { onModalClose={this.onRetagModalClose} /> - - state.albums, - (albums) => { +const selectBooks = createSelector( + (state) => state.books, + (books) => { const { items, isFetching, isPopulated, error - } = albums; + } = books; - const hasAlbums = !!items.length; - const hasMonitoredAlbums = items.some((e) => e.monitored); + const hasBooks = !!items.length; + const hasMonitoredBooks = items.some((e) => e.monitored); return { - isAlbumsFetching: isFetching, - isAlbumsPopulated: isPopulated, - albumsError: error, - hasAlbums, - hasMonitoredAlbums + isBooksFetching: isFetching, + isBooksPopulated: isPopulated, + booksError: error, + hasBooks, + hasMonitoredBooks }; } ); @@ -65,23 +65,23 @@ const selectSeries = createSelector( } ); -const selectTrackFiles = createSelector( - (state) => state.trackFiles, - (trackFiles) => { +const selectBookFiles = createSelector( + (state) => state.bookFiles, + (bookFiles) => { const { items, isFetching, isPopulated, error - } = trackFiles; + } = bookFiles; - const hasTrackFiles = !!items.length; + const hasBookFiles = !!items.length; return { - isTrackFilesFetching: isFetching, - isTrackFilesPopulated: isPopulated, - trackFilesError: error, - hasTrackFiles + isBookFilesFetching: isFetching, + isBookFilesPopulated: isPopulated, + bookFilesError: error, + hasBookFiles }; } ); @@ -89,27 +89,27 @@ const selectTrackFiles = createSelector( function createMapStateToProps() { return createSelector( (state, { titleSlug }) => titleSlug, - selectAlbums, + selectBooks, selectSeries, - selectTrackFiles, - createAllArtistSelector(), + selectBookFiles, + createAllAuthorSelector(), createCommandsSelector(), - (titleSlug, albums, series, trackFiles, allArtists, commands) => { - const sortedArtist = _.orderBy(allArtists, 'sortName'); - const artistIndex = _.findIndex(sortedArtist, { titleSlug }); - const artist = sortedArtist[artistIndex]; + (titleSlug, books, series, bookFiles, allAuthors, commands) => { + const sortedAuthor = _.orderBy(allAuthors, 'sortName'); + const authorIndex = _.findIndex(sortedAuthor, { titleSlug }); + const author = sortedAuthor[authorIndex]; - if (!artist) { + if (!author) { return {}; } const { - isAlbumsFetching, - isAlbumsPopulated, - albumsError, - hasAlbums, - hasMonitoredAlbums - } = albums; + isBooksFetching, + isBooksPopulated, + booksError, + hasBooks, + hasMonitoredBooks + } = books; const { isSeriesFetching, @@ -120,34 +120,34 @@ function createMapStateToProps() { } = series; const { - isTrackFilesFetching, - isTrackFilesPopulated, - trackFilesError, - hasTrackFiles - } = trackFiles; - - const previousArtist = sortedArtist[artistIndex - 1] || _.last(sortedArtist); - const nextArtist = sortedArtist[artistIndex + 1] || _.first(sortedArtist); - const isArtistRefreshing = isCommandExecuting(findCommand(commands, { name: commandNames.REFRESH_ARTIST, authorId: artist.id })); - const artistRefreshingCommand = findCommand(commands, { name: commandNames.REFRESH_ARTIST }); - const allArtistRefreshing = ( - isCommandExecuting(artistRefreshingCommand) && - !artistRefreshingCommand.body.authorId + isBookFilesFetching, + isBookFilesPopulated, + bookFilesError, + hasBookFiles + } = bookFiles; + + const previousAuthor = sortedAuthor[authorIndex - 1] || _.last(sortedAuthor); + const nextAuthor = sortedAuthor[authorIndex + 1] || _.first(sortedAuthor); + const isAuthorRefreshing = isCommandExecuting(findCommand(commands, { name: commandNames.REFRESH_AUTHOR, authorId: author.id })); + const authorRefreshingCommand = findCommand(commands, { name: commandNames.REFRESH_AUTHOR }); + const allAuthorRefreshing = ( + isCommandExecuting(authorRefreshingCommand) && + !authorRefreshingCommand.body.authorId ); - const isRefreshing = isArtistRefreshing || allArtistRefreshing; - const isSearching = isCommandExecuting(findCommand(commands, { name: commandNames.ARTIST_SEARCH, authorId: artist.id })); - const isRenamingFiles = isCommandExecuting(findCommand(commands, { name: commandNames.RENAME_FILES, authorId: artist.id })); - - const isRenamingArtistCommand = findCommand(commands, { name: commandNames.RENAME_ARTIST }); - const isRenamingArtist = ( - isCommandExecuting(isRenamingArtistCommand) && - isRenamingArtistCommand.body.authorIds.indexOf(artist.id) > -1 + const isRefreshing = isAuthorRefreshing || allAuthorRefreshing; + const isSearching = isCommandExecuting(findCommand(commands, { name: commandNames.AUTHOR_SEARCH, authorId: author.id })); + const isRenamingFiles = isCommandExecuting(findCommand(commands, { name: commandNames.RENAME_FILES, authorId: author.id })); + + const isRenamingAuthorCommand = findCommand(commands, { name: commandNames.RENAME_AUTHOR }); + const isRenamingAuthor = ( + isCommandExecuting(isRenamingAuthorCommand) && + isRenamingAuthorCommand.body.authorIds.indexOf(author.id) > -1 ); - const isFetching = isAlbumsFetching || isSeriesFetching || isTrackFilesFetching; - const isPopulated = isAlbumsPopulated && isSeriesPopulated && isTrackFilesPopulated; + const isFetching = isBooksFetching || isSeriesFetching || isBookFilesFetching; + const isPopulated = isBooksPopulated && isSeriesPopulated && isBookFilesPopulated; - const alternateTitles = _.reduce(artist.alternateTitles, (acc, alternateTitle) => { + const alternateTitles = _.reduce(author.alternateTitles, (acc, alternateTitle) => { if ((alternateTitle.seasonNumber === -1 || alternateTitle.seasonNumber === undefined) && (alternateTitle.sceneSeasonNumber === -1 || alternateTitle.sceneSeasonNumber === undefined)) { acc.push(alternateTitle.title); @@ -157,39 +157,39 @@ function createMapStateToProps() { }, []); return { - ...artist, + ...author, alternateTitles, - isArtistRefreshing, - allArtistRefreshing, + isAuthorRefreshing, + allAuthorRefreshing, isRefreshing, isSearching, isRenamingFiles, - isRenamingArtist, + isRenamingAuthor, isFetching, isPopulated, - albumsError, + booksError, seriesError, - trackFilesError, - hasAlbums, - hasMonitoredAlbums, + bookFilesError, + hasBooks, + hasMonitoredBooks, hasSeries, series: seriesItems, - hasTrackFiles, - previousArtist, - nextArtist + hasBookFiles, + previousAuthor, + nextAuthor }; } ); } const mapDispatchToProps = { - fetchAlbums, - clearAlbums, + fetchBooks, + clearBooks, fetchSeries, clearSeries, - fetchTrackFiles, - clearTrackFiles, - toggleArtistMonitored, + fetchBookFiles, + clearBookFiles, + toggleAuthorMonitored, fetchQueueDetails, clearQueueDetails, clearReleases, @@ -197,7 +197,7 @@ const mapDispatchToProps = { executeCommand }; -class ArtistDetailsConnector extends Component { +class AuthorDetailsConnector extends Component { // // Lifecycle @@ -210,22 +210,22 @@ class ArtistDetailsConnector extends Component { componentDidUpdate(prevProps) { const { id, - isArtistRefreshing, - allArtistRefreshing, + isAuthorRefreshing, + allAuthorRefreshing, isRenamingFiles, - isRenamingArtist + isRenamingAuthor } = this.props; if ( - (prevProps.isArtistRefreshing && !isArtistRefreshing) || - (prevProps.allArtistRefreshing && !allArtistRefreshing) || + (prevProps.isAuthorRefreshing && !isAuthorRefreshing) || + (prevProps.allAuthorRefreshing && !allAuthorRefreshing) || (prevProps.isRenamingFiles && !isRenamingFiles) || - (prevProps.isRenamingArtist && !isRenamingArtist) + (prevProps.isRenamingAuthor && !isRenamingAuthor) ) { this.populate(); } - // If the id has changed we need to clear the albums + // If the id has changed we need to clear the books // files and fetch from the server. if (prevProps.id !== id) { @@ -245,17 +245,17 @@ class ArtistDetailsConnector extends Component { populate = () => { const authorId = this.props.id; - this.props.fetchAlbums({ authorId }); + this.props.fetchBooks({ authorId }); this.props.fetchSeries({ authorId }); - this.props.fetchTrackFiles({ authorId }); + this.props.fetchBookFiles({ authorId }); this.props.fetchQueueDetails({ authorId }); } unpopulate = () => { this.props.cancelFetchReleases(); - this.props.clearAlbums(); + this.props.clearBooks(); this.props.clearSeries(); - this.props.clearTrackFiles(); + this.props.clearBookFiles(); this.props.clearQueueDetails(); this.props.clearReleases(); } @@ -264,7 +264,7 @@ class ArtistDetailsConnector extends Component { // Listeners onMonitorTogglePress = (monitored) => { - this.props.toggleArtistMonitored({ + this.props.toggleAuthorMonitored({ authorId: this.props.id, monitored }); @@ -272,14 +272,14 @@ class ArtistDetailsConnector extends Component { onRefreshPress = () => { this.props.executeCommand({ - name: commandNames.REFRESH_ARTIST, + name: commandNames.REFRESH_AUTHOR, authorId: this.props.id }); } onSearchPress = () => { this.props.executeCommand({ - name: commandNames.ARTIST_SEARCH, + name: commandNames.AUTHOR_SEARCH, authorId: this.props.id }); } @@ -289,7 +289,7 @@ class ArtistDetailsConnector extends Component { render() { return ( - match, - (state) => state.artist, - (match, artist) => { + (state) => state.authors, + (match, authors) => { const titleSlug = match.params.titleSlug; const { isFetching, isPopulated, error, items - } = artist; + } = authors; - const artistIndex = _.findIndex(items, { titleSlug }); + const authorIndex = _.findIndex(items, { titleSlug }); - if (artistIndex > -1) { + if (authorIndex > -1) { return { isFetching, isPopulated, @@ -48,7 +48,7 @@ const mapDispatchToProps = { push }; -class ArtistDetailsPageConnector extends Component { +class AuthorDetailsPageConnector extends Component { // // Lifecycle @@ -98,14 +98,14 @@ class ArtistDetailsPageConnector extends Component { } return ( - ); } } -ArtistDetailsPageConnector.propTypes = { +AuthorDetailsPageConnector.propTypes = { titleSlug: PropTypes.string, isFetching: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired, @@ -114,4 +114,4 @@ ArtistDetailsPageConnector.propTypes = { push: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(ArtistDetailsPageConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(AuthorDetailsPageConnector); diff --git a/frontend/src/Artist/Details/ArtistDetailsSeason.css b/frontend/src/Author/Details/AuthorDetailsSeason.css similarity index 95% rename from frontend/src/Artist/Details/ArtistDetailsSeason.css rename to frontend/src/Author/Details/AuthorDetailsSeason.css index 127f0c772..6f8731693 100644 --- a/frontend/src/Artist/Details/ArtistDetailsSeason.css +++ b/frontend/src/Author/Details/AuthorDetailsSeason.css @@ -1,4 +1,4 @@ -.albumType { +.bookType { margin-bottom: 20px; border: 1px solid $borderColor; border-radius: 4px; @@ -18,12 +18,12 @@ cursor: pointer; } -.albumTypeLabel { +.bookTypeLabel { margin-right: 5px; margin-left: 5px; } -.albumCount { +.bookCount { color: #8895aa; font-style: italic; font-size: 18px; @@ -75,7 +75,7 @@ width: 30px; } -.albums { +.books { padding-top: 15px; border-top: 1px solid $borderColor; } @@ -106,13 +106,13 @@ margin-left: -15px; } -.noAlbums { +.noBooks { margin-bottom: 15px; text-align: center; } @media only screen and (max-width: $breakpointSmall) { - .albumType { + .bookType { border-right: 0; border-left: 0; border-radius: 0; diff --git a/frontend/src/Artist/Details/ArtistDetailsSeason.js b/frontend/src/Author/Details/AuthorDetailsSeason.js similarity index 73% rename from frontend/src/Artist/Details/ArtistDetailsSeason.js rename to frontend/src/Author/Details/AuthorDetailsSeason.js index 6fdc8f218..d143189ac 100644 --- a/frontend/src/Artist/Details/ArtistDetailsSeason.js +++ b/frontend/src/Author/Details/AuthorDetailsSeason.js @@ -5,10 +5,10 @@ import getToggledRange from 'Utilities/Table/getToggledRange'; import { sortDirections } from 'Helpers/Props'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; -import AlbumRowConnector from './AlbumRowConnector'; -import styles from './ArtistDetailsSeason.css'; +import BookRowConnector from './BookRowConnector'; +import styles from './AuthorDetailsSeason.css'; -class ArtistDetailsSeason extends Component { +class AuthorDetailsSeason extends Component { // // Lifecycle @@ -17,15 +17,15 @@ class ArtistDetailsSeason extends Component { super(props, context); this.state = { - lastToggledAlbum: null + lastToggledBook: null }; } // // Listeners - onMonitorAlbumPress = (bookId, monitored, { shiftKey }) => { - const lastToggled = this.state.lastToggledAlbum; + onMonitorBookPress = (bookId, monitored, { shiftKey }) => { + const lastToggled = this.state.lastToggledBook; const bookIds = [bookId]; if (shiftKey && lastToggled) { @@ -37,9 +37,9 @@ class ArtistDetailsSeason extends Component { } } - this.setState({ lastToggledAlbum: bookId }); + this.setState({ lastToggledBook: bookId }); - this.props.onMonitorAlbumPress(_.uniq(bookIds), monitored); + this.props.onMonitorBookPress(_.uniq(bookIds), monitored); } // @@ -57,9 +57,9 @@ class ArtistDetailsSeason extends Component { return (
-
+
{ return ( - ); }) @@ -88,7 +88,7 @@ class ArtistDetailsSeason extends Component { } } -ArtistDetailsSeason.propTypes = { +AuthorDetailsSeason.propTypes = { sortKey: PropTypes.string, sortDirection: PropTypes.oneOf(sortDirections.all), items: PropTypes.arrayOf(PropTypes.object).isRequired, @@ -96,8 +96,8 @@ ArtistDetailsSeason.propTypes = { onTableOptionChange: PropTypes.func.isRequired, onExpandPress: PropTypes.func.isRequired, onSortPress: PropTypes.func.isRequired, - onMonitorAlbumPress: PropTypes.func.isRequired, + onMonitorBookPress: PropTypes.func.isRequired, uiSettings: PropTypes.object.isRequired }; -export default ArtistDetailsSeason; +export default AuthorDetailsSeason; diff --git a/frontend/src/Artist/Details/ArtistDetailsSeasonConnector.js b/frontend/src/Author/Details/AuthorDetailsSeasonConnector.js similarity index 52% rename from frontend/src/Artist/Details/ArtistDetailsSeasonConnector.js rename to frontend/src/Author/Details/AuthorDetailsSeasonConnector.js index 48f81fd51..73d40a465 100644 --- a/frontend/src/Artist/Details/ArtistDetailsSeasonConnector.js +++ b/frontend/src/Author/Details/AuthorDetailsSeasonConnector.js @@ -5,40 +5,40 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createCommandsSelector from 'Store/Selectors/createCommandsSelector'; import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; -import { toggleAlbumsMonitored, setAlbumsTableOption, setAlbumsSort } from 'Store/Actions/albumActions'; +import { setBooksSort, setBooksTableOption, toggleBooksMonitored } from 'Store/Actions/bookActions'; import { executeCommand } from 'Store/Actions/commandActions'; -import ArtistDetailsSeason from './ArtistDetailsSeason'; +import AuthorDetailsSeason from './AuthorDetailsSeason'; function createMapStateToProps() { return createSelector( (state, { label }) => label, - createClientSideCollectionSelector('albums'), - createArtistSelector(), + createClientSideCollectionSelector('books'), + createAuthorSelector(), createCommandsSelector(), createDimensionsSelector(), createUISettingsSelector(), - (label, albums, artist, commands, dimensions, uiSettings) => { + (label, books, author, commands, dimensions, uiSettings) => { - const albumsInGroup = albums.items; + const booksInGroup = books.items; let sortDir = 'asc'; - if (albums.sortDirection === 'descending') { + if (books.sortDirection === 'descending') { sortDir = 'desc'; } - const sortedAlbums = _.orderBy(albumsInGroup, albums.sortKey, sortDir); + const sortedBooks = _.orderBy(booksInGroup, books.sortKey, sortDir); return { - items: sortedAlbums, - columns: albums.columns, - sortKey: albums.sortKey, - sortDirection: albums.sortDirection, - artistMonitored: artist.monitored, + items: sortedBooks, + columns: books.columns, + sortKey: books.sortKey, + sortDirection: books.sortDirection, + authorMonitored: author.monitored, isSmallScreen: dimensions.isSmallScreen, uiSettings }; @@ -47,27 +47,27 @@ function createMapStateToProps() { } const mapDispatchToProps = { - toggleAlbumsMonitored, - setAlbumsTableOption, - dispatchSetAlbumSort: setAlbumsSort, + toggleBooksMonitored, + setBooksTableOption, + dispatchSetBookSort: setBooksSort, executeCommand }; -class ArtistDetailsSeasonConnector extends Component { +class AuthorDetailsSeasonConnector extends Component { // // Listeners onTableOptionChange = (payload) => { - this.props.setAlbumsTableOption(payload); + this.props.setBooksTableOption(payload); } onSortPress = (sortKey) => { - this.props.dispatchSetAlbumSort({ sortKey }); + this.props.dispatchSetBookSort({ sortKey }); } - onMonitorAlbumPress = (bookIds, monitored) => { - this.props.toggleAlbumsMonitored({ + onMonitorBookPress = (bookIds, monitored) => { + this.props.toggleBooksMonitored({ bookIds, monitored }); @@ -78,22 +78,22 @@ class ArtistDetailsSeasonConnector extends Component { render() { return ( - ); } } -ArtistDetailsSeasonConnector.propTypes = { +AuthorDetailsSeasonConnector.propTypes = { authorId: PropTypes.number.isRequired, - toggleAlbumsMonitored: PropTypes.func.isRequired, - setAlbumsTableOption: PropTypes.func.isRequired, - dispatchSetAlbumSort: PropTypes.func.isRequired, + toggleBooksMonitored: PropTypes.func.isRequired, + setBooksTableOption: PropTypes.func.isRequired, + dispatchSetBookSort: PropTypes.func.isRequired, executeCommand: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(ArtistDetailsSeasonConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(AuthorDetailsSeasonConnector); diff --git a/frontend/src/Artist/Details/AuthorDetailsSeries.css b/frontend/src/Author/Details/AuthorDetailsSeries.css similarity index 95% rename from frontend/src/Artist/Details/AuthorDetailsSeries.css rename to frontend/src/Author/Details/AuthorDetailsSeries.css index 21591d93e..19c305749 100644 --- a/frontend/src/Artist/Details/AuthorDetailsSeries.css +++ b/frontend/src/Author/Details/AuthorDetailsSeries.css @@ -1,4 +1,4 @@ -.albumType { +.bookType { margin-bottom: 20px; border: 1px solid $borderColor; border-radius: 4px; @@ -18,12 +18,12 @@ cursor: pointer; } -.albumTypeLabel { +.bookTypeLabel { margin-right: 5px; margin-left: 5px; } -.albumCount { +.bookCount { color: #8895aa; font-style: italic; font-size: 18px; @@ -75,7 +75,7 @@ width: 30px; } -.albums { +.books { padding-top: 15px; border-top: 1px solid $borderColor; } @@ -108,13 +108,13 @@ /* margin-left: -15px; */ } -.noAlbums { +.noBooks { margin-bottom: 15px; text-align: center; } @media only screen and (max-width: $breakpointSmall) { - .albumType { + .bookType { border-right: 0; border-left: 0; border-radius: 0; diff --git a/frontend/src/Artist/Details/AuthorDetailsSeries.js b/frontend/src/Author/Details/AuthorDetailsSeries.js similarity index 84% rename from frontend/src/Artist/Details/AuthorDetailsSeries.js rename to frontend/src/Author/Details/AuthorDetailsSeries.js index d28b90635..892c4c058 100644 --- a/frontend/src/Artist/Details/AuthorDetailsSeries.js +++ b/frontend/src/Author/Details/AuthorDetailsSeries.js @@ -8,7 +8,7 @@ import IconButton from 'Components/Link/IconButton'; import Link from 'Components/Link/Link'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; -import AlbumRowConnector from './AlbumRowConnector'; +import BookRowConnector from './BookRowConnector'; import styles from './AuthorDetailsSeries.css'; class AuthorDetailsSeries extends Component { @@ -21,8 +21,8 @@ class AuthorDetailsSeries extends Component { this.state = { isOrganizeModalOpen: false, - isManageTracksOpen: false, - lastToggledAlbum: null + isManageBooksOpen: false, + lastToggledBook: null }; } @@ -65,22 +65,22 @@ class AuthorDetailsSeries extends Component { this.props.onExpandPress(id, !isExpanded); } - onMonitorAlbumPress = (albumId, monitored, { shiftKey }) => { - const lastToggled = this.state.lastToggledAlbum; - const albumIds = [albumId]; + onMonitorBookPress = (bookId, monitored, { shiftKey }) => { + const lastToggled = this.state.lastToggledBook; + const bookIds = [bookId]; if (shiftKey && lastToggled) { - const { lower, upper } = getToggledRange(this.props.items, albumId, lastToggled); + const { lower, upper } = getToggledRange(this.props.items, bookId, lastToggled); const items = this.props.items; for (let i = lower; i < upper; i++) { - albumIds.push(items[i].id); + bookIds.push(items[i].id); } } - this.setState({ lastToggledAlbum: albumId }); + this.setState({ lastToggledBook: bookId }); - this.props.onMonitorAlbumPress(_.uniq(albumIds), monitored); + this.props.onMonitorBookPress(_.uniq(bookIds), monitored); } // @@ -102,7 +102,7 @@ class AuthorDetailsSeries extends Component { return (
{
- + {label} - + ({items.length} Books)
@@ -142,7 +142,7 @@ class AuthorDetailsSeries extends Component {
{ isExpanded && -
+
{ return ( - ); }) @@ -198,7 +198,7 @@ AuthorDetailsSeries.propTypes = { onTableOptionChange: PropTypes.func.isRequired, onExpandPress: PropTypes.func.isRequired, onSortPress: PropTypes.func.isRequired, - onMonitorAlbumPress: PropTypes.func.isRequired, + onMonitorBookPress: PropTypes.func.isRequired, uiSettings: PropTypes.object.isRequired }; diff --git a/frontend/src/Artist/Details/AuthorDetailsSeriesConnector.js b/frontend/src/Author/Details/AuthorDetailsSeriesConnector.js similarity index 80% rename from frontend/src/Artist/Details/AuthorDetailsSeriesConnector.js rename to frontend/src/Author/Details/AuthorDetailsSeriesConnector.js index 8f38324f7..acd5bcda4 100644 --- a/frontend/src/Artist/Details/AuthorDetailsSeriesConnector.js +++ b/frontend/src/Author/Details/AuthorDetailsSeriesConnector.js @@ -5,11 +5,11 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createCommandsSelector from 'Store/Selectors/createCommandsSelector'; // import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; -import { toggleAlbumsMonitored, setAlbumsTableOption } from 'Store/Actions/albumActions'; +import { setBooksTableOption, toggleBooksMonitored } from 'Store/Actions/bookActions'; import { setSeriesSort } from 'Store/Actions/seriesActions'; import { executeCommand } from 'Store/Actions/commandActions'; import AuthorDetailsSeries from './AuthorDetailsSeries'; @@ -17,8 +17,8 @@ import AuthorDetailsSeries from './AuthorDetailsSeries'; function createMapStateToProps() { return createSelector( (state, { seriesId }) => seriesId, - (state) => state.albums, - createArtistSelector(), + (state) => state.books, + createAuthorSelector(), (state) => state.series, createCommandsSelector(), createDimensionsSelector(), @@ -60,7 +60,7 @@ function createMapStateToProps() { columns: series.columns, sortKey: series.sortKey, sortDirection: series.sortDirection, - artistMonitored: author.monitored, + authorMonitored: author.monitored, isSmallScreen: dimensions.isSmallScreen, uiSettings }; @@ -69,27 +69,27 @@ function createMapStateToProps() { } const mapDispatchToProps = { - toggleAlbumsMonitored, - setAlbumsTableOption, + toggleBooksMonitored, + setBooksTableOption, dispatchSetSeriesSort: setSeriesSort, executeCommand }; -class ArtistDetailsSeasonConnector extends Component { +class AuthorDetailsSeasonConnector extends Component { // // Listeners onTableOptionChange = (payload) => { - this.props.setAlbumsTableOption(payload); + this.props.setBooksTableOption(payload); } onSortPress = (sortKey) => { this.props.dispatchSetSeriesSort({ sortKey }); } - onMonitorAlbumPress = (bookIds, monitored) => { - this.props.toggleAlbumsMonitored({ + onMonitorBookPress = (bookIds, monitored) => { + this.props.toggleBooksMonitored({ bookIds, monitored }); @@ -104,18 +104,18 @@ class ArtistDetailsSeasonConnector extends Component { {...this.props} onSortPress={this.onSortPress} onTableOptionChange={this.onTableOptionChange} - onMonitorAlbumPress={this.onMonitorAlbumPress} + onMonitorBookPress={this.onMonitorBookPress} /> ); } } -ArtistDetailsSeasonConnector.propTypes = { +AuthorDetailsSeasonConnector.propTypes = { authorId: PropTypes.number.isRequired, - toggleAlbumsMonitored: PropTypes.func.isRequired, - setAlbumsTableOption: PropTypes.func.isRequired, + toggleBooksMonitored: PropTypes.func.isRequired, + setBooksTableOption: PropTypes.func.isRequired, dispatchSetSeriesSort: PropTypes.func.isRequired, executeCommand: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(ArtistDetailsSeasonConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(AuthorDetailsSeasonConnector); diff --git a/frontend/src/Artist/Details/ArtistTags.css b/frontend/src/Author/Details/AuthorTags.css similarity index 100% rename from frontend/src/Artist/Details/ArtistTags.css rename to frontend/src/Author/Details/AuthorTags.css diff --git a/frontend/src/Artist/Details/ArtistTags.js b/frontend/src/Author/Details/AuthorTags.js similarity index 85% rename from frontend/src/Artist/Details/ArtistTags.js rename to frontend/src/Author/Details/AuthorTags.js index 7ea841a36..0a20ea165 100644 --- a/frontend/src/Artist/Details/ArtistTags.js +++ b/frontend/src/Author/Details/AuthorTags.js @@ -3,7 +3,7 @@ import React from 'react'; import { kinds, sizes } from 'Helpers/Props'; import Label from 'Components/Label'; -function ArtistTags({ tags }) { +function AuthorTags({ tags }) { return (
{ @@ -23,8 +23,8 @@ function ArtistTags({ tags }) { ); } -ArtistTags.propTypes = { +AuthorTags.propTypes = { tags: PropTypes.arrayOf(PropTypes.string).isRequired }; -export default ArtistTags; +export default AuthorTags; diff --git a/frontend/src/Artist/Details/ArtistTagsConnector.js b/frontend/src/Author/Details/AuthorTagsConnector.js similarity index 64% rename from frontend/src/Artist/Details/ArtistTagsConnector.js rename to frontend/src/Author/Details/AuthorTagsConnector.js index 1ecde26cd..9d43fb9b6 100644 --- a/frontend/src/Artist/Details/ArtistTagsConnector.js +++ b/frontend/src/Author/Details/AuthorTagsConnector.js @@ -1,16 +1,16 @@ import _ from 'lodash'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; -import ArtistTags from './ArtistTags'; +import AuthorTags from './AuthorTags'; function createMapStateToProps() { return createSelector( - createArtistSelector(), + createAuthorSelector(), createTagsSelector(), - (artist, tagList) => { - const tags = _.reduce(artist.tags, (acc, tag) => { + (author, tagList) => { + const tags = _.reduce(author.tags, (acc, tag) => { const matchingTag = _.find(tagList, { id: tag }); if (matchingTag) { @@ -27,4 +27,4 @@ function createMapStateToProps() { ); } -export default connect(createMapStateToProps)(ArtistTags); +export default connect(createMapStateToProps)(AuthorTags); diff --git a/frontend/src/Artist/Details/AlbumRow.css b/frontend/src/Author/Details/BookRow.css similarity index 100% rename from frontend/src/Artist/Details/AlbumRow.css rename to frontend/src/Author/Details/BookRow.css diff --git a/frontend/src/Artist/Details/AlbumRow.js b/frontend/src/Author/Details/BookRow.js similarity index 75% rename from frontend/src/Artist/Details/AlbumRow.js rename to frontend/src/Author/Details/BookRow.js index 47f24e6c8..1bfe6b114 100644 --- a/frontend/src/Artist/Details/AlbumRow.js +++ b/frontend/src/Author/Details/BookRow.js @@ -6,13 +6,13 @@ import { kinds, sizes } from 'Helpers/Props'; import TableRow from 'Components/Table/TableRow'; import Label from 'Components/Label'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; -import AlbumSearchCellConnector from 'Album/AlbumSearchCellConnector'; -import AlbumTitleLink from 'Album/AlbumTitleLink'; +import BookSearchCellConnector from 'Book/BookSearchCellConnector'; +import BookTitleLink from 'Book/BookTitleLink'; import StarRating from 'Components/StarRating'; -import styles from './AlbumRow.css'; +import styles from './BookRow.css'; -function getTrackCountKind(monitored, trackFileCount, trackCount) { - if (trackFileCount === trackCount && trackCount > 0) { +function getBookCountKind(monitored, bookFileCount, bookCount) { + if (bookFileCount === bookCount && bookCount > 0) { return kinds.SUCCESS; } @@ -23,7 +23,7 @@ function getTrackCountKind(monitored, trackFileCount, trackCount) { return kinds.DANGER; } -class AlbumRow extends Component { +class BookRow extends Component { // // Lifecycle @@ -33,7 +33,7 @@ class AlbumRow extends Component { this.state = { isDetailsModalOpen: false, - isEditAlbumModalOpen: false + isEditBookModalOpen: false }; } @@ -48,16 +48,16 @@ class AlbumRow extends Component { this.setState({ isDetailsModalOpen: false }); } - onEditAlbumPress = () => { - this.setState({ isEditAlbumModalOpen: true }); + onEditBookPress = () => { + this.setState({ isEditBookModalOpen: true }); } - onEditAlbumModalClose = () => { - this.setState({ isEditAlbumModalOpen: false }); + onEditBookModalClose = () => { + this.setState({ isEditBookModalOpen: false }); } - onMonitorAlbumPress = (monitored, options) => { - this.props.onMonitorAlbumPress(this.props.id, monitored, options); + onMonitorBookPress = (monitored, options) => { + this.props.onMonitorBookPress(this.props.id, monitored, options); } // @@ -75,15 +75,15 @@ class AlbumRow extends Component { ratings, disambiguation, isSaving, - artistMonitored, + authorMonitored, titleSlug, columns } = this.props; const { - trackCount, - trackFileCount, - totalTrackCount + bookCount, + bookFileCount, + totalBookCount } = statistics; return ( @@ -107,9 +107,9 @@ class AlbumRow extends Component { > ); @@ -121,7 +121,7 @@ class AlbumRow extends Component { key={name} className={styles.title} > - @@ -184,11 +184,11 @@ class AlbumRow extends Component { if (name === 'actions') { return ( - ); } @@ -200,7 +200,7 @@ class AlbumRow extends Component { } } -AlbumRow.propTypes = { +BookRow.propTypes = { id: PropTypes.number.isRequired, authorId: PropTypes.number.isRequired, monitored: PropTypes.bool.isRequired, @@ -211,17 +211,17 @@ AlbumRow.propTypes = { disambiguation: PropTypes.string, titleSlug: PropTypes.string.isRequired, isSaving: PropTypes.bool, - artistMonitored: PropTypes.bool.isRequired, + authorMonitored: PropTypes.bool.isRequired, statistics: PropTypes.object.isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired, - onMonitorAlbumPress: PropTypes.func.isRequired + onMonitorBookPress: PropTypes.func.isRequired }; -AlbumRow.defaultProps = { +BookRow.defaultProps = { statistics: { - trackCount: 0, - trackFileCount: 0 + bookCount: 0, + bookFileCount: 0 } }; -export default AlbumRow; +export default BookRow; diff --git a/frontend/src/Author/Details/BookRowConnector.js b/frontend/src/Author/Details/BookRowConnector.js new file mode 100644 index 000000000..c0c7d0087 --- /dev/null +++ b/frontend/src/Author/Details/BookRowConnector.js @@ -0,0 +1,20 @@ +/* eslint max-params: 0 */ +import { connect } from 'react-redux'; +import { createSelector } from 'reselect'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; +import createBookFileSelector from 'Store/Selectors/createBookFileSelector'; +import BookRow from './BookRow'; + +function createMapStateToProps() { + return createSelector( + createAuthorSelector(), + createBookFileSelector(), + (author = {}, bookFile) => { + return { + authorMonitored: author.monitored, + bookFilePath: bookFile ? bookFile.path : null + }; + } + ); +} +export default connect(createMapStateToProps)(BookRow); diff --git a/frontend/src/Artist/Edit/EditArtistModal.js b/frontend/src/Author/Edit/EditAuthorModal.js similarity index 62% rename from frontend/src/Artist/Edit/EditArtistModal.js rename to frontend/src/Author/Edit/EditAuthorModal.js index 6e99a2f53..cb93641d7 100644 --- a/frontend/src/Artist/Edit/EditArtistModal.js +++ b/frontend/src/Author/Edit/EditAuthorModal.js @@ -1,15 +1,15 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import EditArtistModalContentConnector from './EditArtistModalContentConnector'; +import EditAuthorModalContentConnector from './EditAuthorModalContentConnector'; -function EditArtistModal({ isOpen, onModalClose, ...otherProps }) { +function EditAuthorModal({ isOpen, onModalClose, ...otherProps }) { return ( - @@ -17,9 +17,9 @@ function EditArtistModal({ isOpen, onModalClose, ...otherProps }) { ); } -EditArtistModal.propTypes = { +EditAuthorModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default EditArtistModal; +export default EditAuthorModal; diff --git a/frontend/src/Artist/Edit/EditArtistModalConnector.js b/frontend/src/Author/Edit/EditAuthorModalConnector.js similarity index 66% rename from frontend/src/Artist/Edit/EditArtistModalConnector.js rename to frontend/src/Author/Edit/EditAuthorModalConnector.js index 9e62a4780..213a0cb19 100644 --- a/frontend/src/Artist/Edit/EditArtistModalConnector.js +++ b/frontend/src/Author/Edit/EditAuthorModalConnector.js @@ -2,19 +2,19 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { clearPendingChanges } from 'Store/Actions/baseActions'; -import EditArtistModal from './EditArtistModal'; +import EditAuthorModal from './EditAuthorModal'; const mapDispatchToProps = { clearPendingChanges }; -class EditArtistModalConnector extends Component { +class EditAuthorModalConnector extends Component { // // Listeners onModalClose = () => { - this.props.clearPendingChanges({ section: 'artist' }); + this.props.clearPendingChanges({ section: 'author' }); this.props.onModalClose(); } @@ -23,7 +23,7 @@ class EditArtistModalConnector extends Component { render() { return ( - @@ -31,9 +31,9 @@ class EditArtistModalConnector extends Component { } } -EditArtistModalConnector.propTypes = { +EditAuthorModalConnector.propTypes = { onModalClose: PropTypes.func.isRequired, clearPendingChanges: PropTypes.func.isRequired }; -export default connect(undefined, mapDispatchToProps)(EditArtistModalConnector); +export default connect(undefined, mapDispatchToProps)(EditAuthorModalConnector); diff --git a/frontend/src/Artist/Edit/EditArtistModalContent.css b/frontend/src/Author/Edit/EditAuthorModalContent.css similarity index 100% rename from frontend/src/Artist/Edit/EditArtistModalContent.css rename to frontend/src/Author/Edit/EditAuthorModalContent.css diff --git a/frontend/src/Artist/Edit/EditArtistModalContent.js b/frontend/src/Author/Edit/EditAuthorModalContent.js similarity index 85% rename from frontend/src/Artist/Edit/EditArtistModalContent.js rename to frontend/src/Author/Edit/EditAuthorModalContent.js index c1e5a40c7..dd4bf9915 100644 --- a/frontend/src/Artist/Edit/EditArtistModalContent.js +++ b/frontend/src/Author/Edit/EditAuthorModalContent.js @@ -13,11 +13,11 @@ import FormLabel from 'Components/Form/FormLabel'; import FormInputGroup from 'Components/Form/FormInputGroup'; import Icon from 'Components/Icon'; import Popover from 'Components/Tooltip/Popover'; -import MoveArtistModal from 'Artist/MoveArtist/MoveArtistModal'; -import ArtistMetadataProfilePopoverContent from 'AddArtist/ArtistMetadataProfilePopoverContent'; -import styles from './EditArtistModalContent.css'; +import MoveAuthorModal from 'Author/MoveAuthor/MoveAuthorModal'; +import AuthorMetadataProfilePopoverContent from 'AddAuthor/AuthorMetadataProfilePopoverContent'; +import styles from './EditAuthorModalContent.css'; -class EditArtistModalContent extends Component { +class EditAuthorModalContent extends Component { // // Lifecycle @@ -48,7 +48,7 @@ class EditArtistModalContent extends Component { } } - onMoveArtistPress = () => { + onMoveAuthorPress = () => { this.setState({ isConfirmMoveModalOpen: false }); this.props.onSavePress(true); @@ -59,14 +59,14 @@ class EditArtistModalContent extends Component { render() { const { - artistName, + authorName, item, isSaving, showMetadataProfile, originalPath, onInputChange, onModalClose, - onDeleteArtistPress, + onDeleteAuthorPress, ...otherProps } = this.props; @@ -81,7 +81,7 @@ class EditArtistModalContent extends Component { return ( - Edit - {artistName} + Edit - {authorName} @@ -92,7 +92,7 @@ class EditArtistModalContent extends Component { @@ -123,7 +123,7 @@ class EditArtistModalContent extends Component { /> } title="Metadata Profile" - body={} + body={} position={tooltipPositions.RIGHT} /> @@ -132,7 +132,7 @@ class EditArtistModalContent extends Component { Delete @@ -186,12 +186,12 @@ class EditArtistModalContent extends Component { - @@ -199,9 +199,9 @@ class EditArtistModalContent extends Component { } } -EditArtistModalContent.propTypes = { +EditAuthorModalContent.propTypes = { authorId: PropTypes.number.isRequired, - artistName: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, item: PropTypes.object.isRequired, isSaving: PropTypes.bool.isRequired, showMetadataProfile: PropTypes.bool.isRequired, @@ -210,7 +210,7 @@ EditArtistModalContent.propTypes = { onInputChange: PropTypes.func.isRequired, onSavePress: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired, - onDeleteArtistPress: PropTypes.func.isRequired + onDeleteAuthorPress: PropTypes.func.isRequired }; -export default EditArtistModalContent; +export default EditAuthorModalContent; diff --git a/frontend/src/Artist/Edit/EditArtistModalContentConnector.js b/frontend/src/Author/Edit/EditAuthorModalContentConnector.js similarity index 60% rename from frontend/src/Artist/Edit/EditArtistModalContentConnector.js rename to frontend/src/Author/Edit/EditAuthorModalContentConnector.js index 98e85d689..3163771e3 100644 --- a/frontend/src/Artist/Edit/EditArtistModalContentConnector.js +++ b/frontend/src/Author/Edit/EditAuthorModalContentConnector.js @@ -4,56 +4,55 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import selectSettings from 'Store/Selectors/selectSettings'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; -import { setArtistValue, saveArtist } from 'Store/Actions/artistActions'; -import EditArtistModalContent from './EditArtistModalContent'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; +import { saveAuthor, setAuthorValue } from 'Store/Actions/authorActions'; +import EditAuthorModalContent from './EditAuthorModalContent'; function createIsPathChangingSelector() { return createSelector( - (state) => state.artist.pendingChanges, - createArtistSelector(), - (pendingChanges, artist) => { + (state) => state.authors.pendingChanges, + createAuthorSelector(), + (pendingChanges, author) => { const path = pendingChanges.path; if (path == null) { return false; } - return artist.path !== path; + return author.path !== path; } ); } function createMapStateToProps() { return createSelector( - (state) => state.artist, + (state) => state.authors, (state) => state.settings.metadataProfiles, - createArtistSelector(), + createAuthorSelector(), createIsPathChangingSelector(), - (artistState, metadataProfiles, artist, isPathChanging) => { + (authorsState, metadataProfiles, author, isPathChanging) => { const { isSaving, saveError, pendingChanges - } = artistState; + } = authorsState; - const artistSettings = _.pick(artist, [ + const authorSettings = _.pick(author, [ 'monitored', - 'albumFolder', 'qualityProfileId', 'metadataProfileId', 'path', 'tags' ]); - const settings = selectSettings(artistSettings, pendingChanges, saveError); + const settings = selectSettings(authorSettings, pendingChanges, saveError); return { - artistName: artist.artistName, + authorName: author.authorName, isSaving, saveError, isPathChanging, - originalPath: artist.path, + originalPath: author.path, item: settings.settings, showMetadataProfile: metadataProfiles.items.length > 1, ...settings @@ -63,11 +62,11 @@ function createMapStateToProps() { } const mapDispatchToProps = { - dispatchSetArtistValue: setArtistValue, - dispatchSaveArtist: saveArtist + dispatchSetAuthorValue: setAuthorValue, + dispatchSaveAuthor: saveAuthor }; -class EditArtistModalContentConnector extends Component { +class EditAuthorModalContentConnector extends Component { // // Lifecycle @@ -82,11 +81,11 @@ class EditArtistModalContentConnector extends Component { // Listeners onInputChange = ({ name, value }) => { - this.props.dispatchSetArtistValue({ name, value }); + this.props.dispatchSetAuthorValue({ name, value }); } onSavePress = (moveFiles) => { - this.props.dispatchSaveArtist({ + this.props.dispatchSaveAuthor({ id: this.props.authorId, moveFiles }); @@ -97,23 +96,23 @@ class EditArtistModalContentConnector extends Component { render() { return ( - ); } } -EditArtistModalContentConnector.propTypes = { +EditAuthorModalContentConnector.propTypes = { authorId: PropTypes.number, isSaving: PropTypes.bool.isRequired, saveError: PropTypes.object, - dispatchSetArtistValue: PropTypes.func.isRequired, - dispatchSaveArtist: PropTypes.func.isRequired, + dispatchSetAuthorValue: PropTypes.func.isRequired, + dispatchSaveAuthor: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(EditArtistModalContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(EditAuthorModalContentConnector); diff --git a/frontend/src/Artist/Editor/AudioTags/RetagArtistModal.js b/frontend/src/Author/Editor/AudioTags/RetagAuthorModal.js similarity index 69% rename from frontend/src/Artist/Editor/AudioTags/RetagArtistModal.js rename to frontend/src/Author/Editor/AudioTags/RetagAuthorModal.js index 636ca6618..161b71dc3 100644 --- a/frontend/src/Artist/Editor/AudioTags/RetagArtistModal.js +++ b/frontend/src/Author/Editor/AudioTags/RetagAuthorModal.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import RetagArtistModalContentConnector from './RetagArtistModalContentConnector'; +import RetagAuthorModalContentConnector from './RetagAuthorModalContentConnector'; -function RetagArtistModal(props) { +function RetagAuthorModal(props) { const { isOpen, onModalClose, @@ -15,7 +15,7 @@ function RetagArtistModal(props) { isOpen={isOpen} onModalClose={onModalClose} > - @@ -23,9 +23,9 @@ function RetagArtistModal(props) { ); } -RetagArtistModal.propTypes = { +RetagAuthorModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default RetagArtistModal; +export default RetagAuthorModal; diff --git a/frontend/src/Artist/Editor/AudioTags/RetagArtistModalContent.css b/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContent.css similarity index 100% rename from frontend/src/Artist/Editor/AudioTags/RetagArtistModalContent.css rename to frontend/src/Author/Editor/AudioTags/RetagAuthorModalContent.css diff --git a/frontend/src/Artist/Editor/AudioTags/RetagArtistModalContent.js b/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContent.js similarity index 66% rename from frontend/src/Artist/Editor/AudioTags/RetagArtistModalContent.js rename to frontend/src/Author/Editor/AudioTags/RetagAuthorModalContent.js index 015112556..266698298 100644 --- a/frontend/src/Artist/Editor/AudioTags/RetagArtistModalContent.js +++ b/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContent.js @@ -8,24 +8,24 @@ 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 styles from './RetagArtistModalContent.css'; +import styles from './RetagAuthorModalContent.css'; -function RetagArtistModalContent(props) { +function RetagAuthorModalContent(props) { const { - artistNames, + authorNames, onModalClose, - onRetagArtistPress + onRetagAuthorPress } = props; return ( - Retag Selected Artist + Retag Selected Author - Tip: To preview the tags that will be written... select "Cancel" then click any artist name and use the + 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 {artistNames.length} selected artist? + Are you sure you want to re-tag all files in the {authorNames.length} selected author?
    { - artistNames.map((artistName) => { + authorNames.map((authorName) => { return ( -
  • - {artistName} +
  • + {authorName}
  • ); }) @@ -55,7 +55,7 @@ function RetagArtistModalContent(props) { @@ -64,10 +64,10 @@ function RetagArtistModalContent(props) { ); } -RetagArtistModalContent.propTypes = { - artistNames: PropTypes.arrayOf(PropTypes.string).isRequired, +RetagAuthorModalContent.propTypes = { + authorNames: PropTypes.arrayOf(PropTypes.string).isRequired, onModalClose: PropTypes.func.isRequired, - onRetagArtistPress: PropTypes.func.isRequired + onRetagAuthorPress: PropTypes.func.isRequired }; -export default RetagArtistModalContent; +export default RetagAuthorModalContent; diff --git a/frontend/src/Artist/Editor/AudioTags/RetagArtistModalContentConnector.js b/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContentConnector.js similarity index 58% rename from frontend/src/Artist/Editor/AudioTags/RetagArtistModalContentConnector.js rename to frontend/src/Author/Editor/AudioTags/RetagAuthorModalContentConnector.js index 23777b535..29d52e94c 100644 --- a/frontend/src/Artist/Editor/AudioTags/RetagArtistModalContentConnector.js +++ b/frontend/src/Author/Editor/AudioTags/RetagAuthorModalContentConnector.js @@ -3,25 +3,25 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector'; +import createAllAuthorSelector from 'Store/Selectors/createAllAuthorsSelector'; import { executeCommand } from 'Store/Actions/commandActions'; import * as commandNames from 'Commands/commandNames'; -import RetagArtistModalContent from './RetagArtistModalContent'; +import RetagAuthorModalContent from './RetagAuthorModalContent'; function createMapStateToProps() { return createSelector( (state, { authorIds }) => authorIds, - createAllArtistSelector(), - (authorIds, allArtists) => { - const artist = _.intersectionWith(allArtists, authorIds, (s, id) => { + createAllAuthorSelector(), + (authorIds, allAuthors) => { + const author = _.intersectionWith(allAuthors, authorIds, (s, id) => { return s.id === id; }); - const sortedArtist = _.orderBy(artist, 'sortName'); - const artistNames = _.map(sortedArtist, 'artistName'); + const sortedAuthor = _.orderBy(author, 'sortName'); + const authorNames = _.map(sortedAuthor, 'authorName'); return { - artistNames + authorNames }; } ); @@ -31,14 +31,14 @@ const mapDispatchToProps = { executeCommand }; -class RetagArtistModalContentConnector extends Component { +class RetagAuthorModalContentConnector extends Component { // // Listeners - onRetagArtistPress = () => { + onRetagAuthorPress = () => { this.props.executeCommand({ - name: commandNames.RETAG_ARTIST, + name: commandNames.RETAG_AUTHOR, authorIds: this.props.authorIds }); @@ -50,18 +50,18 @@ class RetagArtistModalContentConnector extends Component { render(props) { return ( - ); } } -RetagArtistModalContentConnector.propTypes = { +RetagAuthorModalContentConnector.propTypes = { authorIds: PropTypes.arrayOf(PropTypes.number).isRequired, onModalClose: PropTypes.func.isRequired, executeCommand: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(RetagArtistModalContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(RetagAuthorModalContentConnector); diff --git a/frontend/src/Artist/Editor/ArtistEditor.js b/frontend/src/Author/Editor/AuthorEditor.js similarity index 77% rename from frontend/src/Artist/Editor/ArtistEditor.js rename to frontend/src/Author/Editor/AuthorEditor.js index 8eba0ce90..ac2585d58 100644 --- a/frontend/src/Artist/Editor/ArtistEditor.js +++ b/frontend/src/Author/Editor/AuthorEditor.js @@ -13,12 +13,12 @@ import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import FilterMenu from 'Components/Menu/FilterMenu'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; -import NoArtist from 'Artist/NoArtist'; -import OrganizeArtistModal from './Organize/OrganizeArtistModal'; -import RetagArtistModal from './AudioTags/RetagArtistModal'; -import ArtistEditorRowConnector from './ArtistEditorRowConnector'; -import ArtistEditorFooter from './ArtistEditorFooter'; -import ArtistEditorFilterModalConnector from './ArtistEditorFilterModalConnector'; +import NoAuthor from 'Author/NoAuthor'; +import OrganizeAuthorModal from './Organize/OrganizeAuthorModal'; +import RetagAuthorModal from './AudioTags/RetagAuthorModal'; +import AuthorEditorRowConnector from './AuthorEditorRowConnector'; +import AuthorEditorFooter from './AuthorEditorFooter'; +import AuthorEditorFilterModalConnector from './AuthorEditorFilterModalConnector'; function getColumns(showMetadataProfile) { return [ @@ -60,7 +60,7 @@ function getColumns(showMetadataProfile) { ]; } -class ArtistEditor extends Component { +class AuthorEditor extends Component { // // Lifecycle @@ -73,8 +73,8 @@ class ArtistEditor extends Component { allUnselected: false, lastToggled: null, selectedState: {}, - isOrganizingArtistModalOpen: false, - isRetaggingArtistModalOpen: false, + isOrganizingAuthorModalOpen: false, + isRetaggingAuthorModalOpen: false, columns: getColumns(props.showMetadataProfile) }; } @@ -121,24 +121,24 @@ class ArtistEditor extends Component { }); } - onOrganizeArtistPress = () => { - this.setState({ isOrganizingArtistModalOpen: true }); + onOrganizeAuthorPress = () => { + this.setState({ isOrganizingAuthorModalOpen: true }); } - onOrganizeArtistModalClose = (organized) => { - this.setState({ isOrganizingArtistModalOpen: false }); + onOrganizeAuthorModalClose = (organized) => { + this.setState({ isOrganizingAuthorModalOpen: false }); if (organized === true) { this.onSelectAllChange({ value: false }); } } - onRetagArtistPress = () => { - this.setState({ isRetaggingArtistModalOpen: true }); + onRetagAuthorPress = () => { + this.setState({ isRetaggingAuthorModalOpen: true }); } - onRetagArtistModalClose = (organized) => { - this.setState({ isRetaggingArtistModalOpen: false }); + onRetagAuthorModalClose = (organized) => { + this.setState({ isRetaggingAuthorModalOpen: false }); if (organized === true) { this.onSelectAllChange({ value: false }); @@ -164,8 +164,8 @@ class ArtistEditor extends Component { saveError, isDeleting, deleteError, - isOrganizingArtist, - isRetaggingArtist, + isOrganizingAuthor, + isRetaggingAuthor, showMetadataProfile, onSortPress, onFilterSelect @@ -181,7 +181,7 @@ class ArtistEditor extends Component { const selectedAuthorIds = this.getSelectedIds(); return ( - + @@ -190,7 +190,7 @@ class ArtistEditor extends Component { selectedFilterKey={selectedFilterKey} filters={filters} customFilters={customFilters} - filterModalConnectorComponent={ArtistEditorFilterModalConnector} + filterModalConnectorComponent={AuthorEditorFilterModalConnector} onFilterSelect={onFilterSelect} /> @@ -204,7 +204,7 @@ class ArtistEditor extends Component { { !isFetching && !!error && -
    {getErrorMessage(error, 'Failed to load artist from API')}
    +
    {getErrorMessage(error, 'Failed to load author from API')}
    } { @@ -224,7 +224,7 @@ class ArtistEditor extends Component { { items.map((item) => { return ( - + } - - -
    @@ -277,7 +277,7 @@ class ArtistEditor extends Component { } } -ArtistEditor.propTypes = { +AuthorEditor.propTypes = { isFetching: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired, error: PropTypes.object, @@ -292,12 +292,12 @@ ArtistEditor.propTypes = { saveError: PropTypes.object, isDeleting: PropTypes.bool.isRequired, deleteError: PropTypes.object, - isOrganizingArtist: PropTypes.bool.isRequired, - isRetaggingArtist: PropTypes.bool.isRequired, + isOrganizingAuthor: PropTypes.bool.isRequired, + isRetaggingAuthor: PropTypes.bool.isRequired, showMetadataProfile: PropTypes.bool.isRequired, onSortPress: PropTypes.func.isRequired, onFilterSelect: PropTypes.func.isRequired, onSaveSelected: PropTypes.func.isRequired }; -export default ArtistEditor; +export default AuthorEditor; diff --git a/frontend/src/Artist/Editor/ArtistEditorConnector.js b/frontend/src/Author/Editor/AuthorEditorConnector.js similarity index 58% rename from frontend/src/Artist/Editor/ArtistEditorConnector.js rename to frontend/src/Author/Editor/AuthorEditorConnector.js index 61f276f41..1f16c5511 100644 --- a/frontend/src/Artist/Editor/ArtistEditorConnector.js +++ b/frontend/src/Author/Editor/AuthorEditorConnector.js @@ -4,38 +4,38 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector'; import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector'; -import { setArtistEditorSort, setArtistEditorFilter, saveArtistEditor } from 'Store/Actions/artistEditorActions'; +import { saveAuthorEditor, setAuthorEditorFilter, setAuthorEditorSort } from 'Store/Actions/authorEditorActions'; import { fetchRootFolders } from 'Store/Actions/settingsActions'; import { executeCommand } from 'Store/Actions/commandActions'; import * as commandNames from 'Commands/commandNames'; -import ArtistEditor from './ArtistEditor'; +import AuthorEditor from './AuthorEditor'; function createMapStateToProps() { return createSelector( (state) => state.settings.metadataProfiles, - createClientSideCollectionSelector('artist', 'artistEditor'), - createCommandExecutingSelector(commandNames.RENAME_ARTIST), - createCommandExecutingSelector(commandNames.RETAG_ARTIST), - (metadataProfiles, artist, isOrganizingArtist, isRetaggingArtist) => { + createClientSideCollectionSelector('authors', 'authorEditor'), + createCommandExecutingSelector(commandNames.RENAME_AUTHOR), + createCommandExecutingSelector(commandNames.RETAG_AUTHOR), + (metadataProfiles, author, isOrganizingAuthor, isRetaggingAuthor) => { return { - isOrganizingArtist, - isRetaggingArtist, + isOrganizingAuthor, + isRetaggingAuthor, showMetadataProfile: metadataProfiles.items.length > 1, - ...artist + ...author }; } ); } const mapDispatchToProps = { - dispatchSetArtistEditorSort: setArtistEditorSort, - dispatchSetArtistEditorFilter: setArtistEditorFilter, - dispatchSaveArtistEditor: saveArtistEditor, + dispatchSetAuthorEditorSort: setAuthorEditorSort, + dispatchSetAuthorEditorFilter: setAuthorEditorFilter, + dispatchSaveAuthorEditor: saveAuthorEditor, dispatchFetchRootFolders: fetchRootFolders, dispatchExecuteCommand: executeCommand }; -class ArtistEditorConnector extends Component { +class AuthorEditorConnector extends Component { // // Lifecycle @@ -48,20 +48,20 @@ class ArtistEditorConnector extends Component { // Listeners onSortPress = (sortKey) => { - this.props.dispatchSetArtistEditorSort({ sortKey }); + this.props.dispatchSetAuthorEditorSort({ sortKey }); } onFilterSelect = (selectedFilterKey) => { - this.props.dispatchSetArtistEditorFilter({ selectedFilterKey }); + this.props.dispatchSetAuthorEditorFilter({ selectedFilterKey }); } onSaveSelected = (payload) => { - this.props.dispatchSaveArtistEditor(payload); + this.props.dispatchSaveAuthorEditor(payload); } onMoveSelected = (payload) => { this.props.dispatchExecuteCommand({ - name: commandNames.MOVE_ARTIST, + name: commandNames.MOVE_AUTHOR, ...payload }); } @@ -71,7 +71,7 @@ class ArtistEditorConnector extends Component { render() { return ( - state.artist.items, - (state) => state.artistEditor.filterBuilderProps, + (state) => state.authors.items, + (state) => state.authorEditor.filterBuilderProps, (sectionItems, filterBuilderProps) => { return { sectionItems, filterBuilderProps, - customFilterType: 'artistEditor' + customFilterType: 'authorEditor' }; } ); } const mapDispatchToProps = { - dispatchSetFilter: setArtistEditorFilter + dispatchSetFilter: setAuthorEditorFilter }; export default connect(createMapStateToProps, mapDispatchToProps)(FilterModal); diff --git a/frontend/src/Artist/Editor/ArtistEditorFooter.css b/frontend/src/Author/Editor/AuthorEditorFooter.css similarity index 97% rename from frontend/src/Artist/Editor/ArtistEditorFooter.css rename to frontend/src/Author/Editor/AuthorEditorFooter.css index 3785f88d3..0d065135c 100644 --- a/frontend/src/Artist/Editor/ArtistEditorFooter.css +++ b/frontend/src/Author/Editor/AuthorEditorFooter.css @@ -64,7 +64,7 @@ justify-content: space-between; } - .selectedArtistLabel { + .selectedAuthorLabel { text-align: left; } } diff --git a/frontend/src/Artist/Editor/ArtistEditorFooter.js b/frontend/src/Author/Editor/AuthorEditorFooter.js similarity index 73% rename from frontend/src/Artist/Editor/ArtistEditorFooter.js rename to frontend/src/Author/Editor/AuthorEditorFooter.js index 39556710e..f8a9a231f 100644 --- a/frontend/src/Artist/Editor/ArtistEditorFooter.js +++ b/frontend/src/Author/Editor/AuthorEditorFooter.js @@ -7,15 +7,15 @@ import QualityProfileSelectInputConnector from 'Components/Form/QualityProfileSe import RootFolderSelectInputConnector from 'Components/Form/RootFolderSelectInputConnector'; import SpinnerButton from 'Components/Link/SpinnerButton'; import PageContentFooter from 'Components/Page/PageContentFooter'; -import MoveArtistModal from 'Artist/MoveArtist/MoveArtistModal'; +import MoveAuthorModal from 'Author/MoveAuthor/MoveAuthorModal'; import TagsModal from './Tags/TagsModal'; -import DeleteArtistModal from './Delete/DeleteArtistModal'; -import ArtistEditorFooterLabel from './ArtistEditorFooterLabel'; -import styles from './ArtistEditorFooter.css'; +import DeleteAuthorModal from './Delete/DeleteAuthorModal'; +import AuthorEditorFooterLabel from './AuthorEditorFooterLabel'; +import styles from './AuthorEditorFooter.css'; const NO_CHANGE = 'noChange'; -class ArtistEditorFooter extends Component { +class AuthorEditorFooter extends Component { // // Lifecycle @@ -27,10 +27,9 @@ class ArtistEditorFooter extends Component { monitored: NO_CHANGE, qualityProfileId: NO_CHANGE, metadataProfileId: NO_CHANGE, - albumFolder: NO_CHANGE, rootFolderPath: NO_CHANGE, savingTags: false, - isDeleteArtistModalOpen: false, + isDeleteAuthorModalOpen: false, isTagsModalOpen: false, isConfirmMoveModalOpen: false, destinationRootFolder: null @@ -48,7 +47,6 @@ class ArtistEditorFooter extends Component { monitored: NO_CHANGE, qualityProfileId: NO_CHANGE, metadataProfileId: NO_CHANGE, - albumFolder: NO_CHANGE, rootFolderPath: NO_CHANGE, savingTags: false }); @@ -75,9 +73,6 @@ class ArtistEditorFooter extends Component { case 'monitored': this.props.onSaveSelected({ [name]: value === 'monitored' }); break; - case 'albumFolder': - this.props.onSaveSelected({ [name]: value === 'yes' }); - break; default: this.props.onSaveSelected({ [name]: value }); } @@ -96,11 +91,11 @@ class ArtistEditorFooter extends Component { } onDeleteSelectedPress = () => { - this.setState({ isDeleteArtistModalOpen: true }); + this.setState({ isDeleteAuthorModalOpen: true }); } - onDeleteArtistModalClose = () => { - this.setState({ isDeleteArtistModalOpen: false }); + onDeleteAuthorModalClose = () => { + this.setState({ isDeleteAuthorModalOpen: false }); } onTagsPress = () => { @@ -120,7 +115,7 @@ class ArtistEditorFooter extends Component { this.props.onSaveSelected({ rootFolderPath: this.state.destinationRootFolder }); } - onMoveArtistPress = () => { + onMoveAuthorPress = () => { this.setState({ isConfirmMoveModalOpen: false, destinationRootFolder: null @@ -141,22 +136,21 @@ class ArtistEditorFooter extends Component { selectedCount, isSaving, isDeleting, - isOrganizingArtist, - isRetaggingArtist, + isOrganizingAuthor, + isRetaggingAuthor, showMetadataProfile, - onOrganizeArtistPress, - onRetagArtistPress + onOrganizeAuthorPress, + onRetagAuthorPress } = this.props; const { monitored, qualityProfileId, metadataProfileId, - albumFolder, rootFolderPath, savingTags, isTagsModalOpen, - isDeleteArtistModalOpen, + isDeleteAuthorModalOpen, isConfirmMoveModalOpen, destinationRootFolder } = this.state; @@ -167,17 +161,11 @@ class ArtistEditorFooter extends Component { { key: 'unmonitored', value: 'Unmonitored' } ]; - const albumFolderOptions = [ - { key: NO_CHANGE, value: 'No Change', disabled: true }, - { key: 'yes', value: 'Yes' }, - { key: 'no', value: 'No' } - ]; - return (
    - @@ -191,7 +179,7 @@ class ArtistEditorFooter extends Component {
    - @@ -208,7 +196,7 @@ class ArtistEditorFooter extends Component { { showMetadataProfile &&
    - @@ -225,22 +213,7 @@ class ArtistEditorFooter extends Component { }
    - - - -
    - -
    - @@ -257,8 +230,8 @@ class ArtistEditorFooter extends Component {
    - @@ -267,9 +240,9 @@ class ArtistEditorFooter extends Component { Rename Files @@ -277,9 +250,9 @@ class ArtistEditorFooter extends Component { Write Metadata Tags @@ -287,7 +260,7 @@ class ArtistEditorFooter extends Component { Set Readarr Tags @@ -314,17 +287,17 @@ class ArtistEditorFooter extends Component { onModalClose={this.onTagsModalClose} /> - - @@ -332,19 +305,19 @@ class ArtistEditorFooter extends Component { } } -ArtistEditorFooter.propTypes = { +AuthorEditorFooter.propTypes = { authorIds: PropTypes.arrayOf(PropTypes.number).isRequired, selectedCount: PropTypes.number.isRequired, isSaving: PropTypes.bool.isRequired, saveError: PropTypes.object, isDeleting: PropTypes.bool.isRequired, deleteError: PropTypes.object, - isOrganizingArtist: PropTypes.bool.isRequired, - isRetaggingArtist: PropTypes.bool.isRequired, + isOrganizingAuthor: PropTypes.bool.isRequired, + isRetaggingAuthor: PropTypes.bool.isRequired, showMetadataProfile: PropTypes.bool.isRequired, onSaveSelected: PropTypes.func.isRequired, - onOrganizeArtistPress: PropTypes.func.isRequired, - onRetagArtistPress: PropTypes.func.isRequired + onOrganizeAuthorPress: PropTypes.func.isRequired, + onRetagAuthorPress: PropTypes.func.isRequired }; -export default ArtistEditorFooter; +export default AuthorEditorFooter; diff --git a/frontend/src/Artist/Editor/ArtistEditorFooterLabel.css b/frontend/src/Author/Editor/AuthorEditorFooterLabel.css similarity index 100% rename from frontend/src/Artist/Editor/ArtistEditorFooterLabel.css rename to frontend/src/Author/Editor/AuthorEditorFooterLabel.css diff --git a/frontend/src/Artist/Editor/ArtistEditorFooterLabel.js b/frontend/src/Author/Editor/AuthorEditorFooterLabel.js similarity index 74% rename from frontend/src/Artist/Editor/ArtistEditorFooterLabel.js rename to frontend/src/Author/Editor/AuthorEditorFooterLabel.js index 1c6be745d..edfb883a2 100644 --- a/frontend/src/Artist/Editor/ArtistEditorFooterLabel.js +++ b/frontend/src/Author/Editor/AuthorEditorFooterLabel.js @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import { icons } from 'Helpers/Props'; import SpinnerIcon from 'Components/SpinnerIcon'; -import styles from './ArtistEditorFooterLabel.css'; +import styles from './AuthorEditorFooterLabel.css'; -function ArtistEditorFooterLabel(props) { +function AuthorEditorFooterLabel(props) { const { className, label, @@ -27,14 +27,14 @@ function ArtistEditorFooterLabel(props) { ); } -ArtistEditorFooterLabel.propTypes = { +AuthorEditorFooterLabel.propTypes = { className: PropTypes.string.isRequired, label: PropTypes.string.isRequired, isSaving: PropTypes.bool.isRequired }; -ArtistEditorFooterLabel.defaultProps = { +AuthorEditorFooterLabel.defaultProps = { className: styles.label }; -export default ArtistEditorFooterLabel; +export default AuthorEditorFooterLabel; diff --git a/frontend/src/Artist/Editor/ArtistEditorRow.js b/frontend/src/Author/Editor/AuthorEditorRow.js similarity index 76% rename from frontend/src/Artist/Editor/ArtistEditorRow.js rename to frontend/src/Author/Editor/AuthorEditorRow.js index ddf35c228..0f04155e7 100644 --- a/frontend/src/Artist/Editor/ArtistEditorRow.js +++ b/frontend/src/Author/Editor/AuthorEditorRow.js @@ -5,16 +5,15 @@ import TagListConnector from 'Components/TagListConnector'; import TableRow from 'Components/Table/TableRow'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; -import ArtistNameLink from 'Artist/ArtistNameLink'; -import ArtistStatusCell from 'Artist/Index/Table/ArtistStatusCell'; -import styles from './ArtistEditorRow.css'; +import AuthorNameLink from 'Author/AuthorNameLink'; +import AuthorStatusCell from 'Author/Index/Table/AuthorStatusCell'; -class ArtistEditorRow extends Component { +class AuthorEditorRow extends Component { // // Listeners - onAlbumFolderChange = () => { + onBookFolderChange = () => { // Mock handler to satisfy `onChange` being required for `CheckInput`. // } @@ -27,8 +26,8 @@ class ArtistEditorRow extends Component { id, status, titleSlug, - artistName, - artistType, + authorName, + authorType, monitored, metadataProfile, qualityProfile, @@ -47,16 +46,16 @@ class ArtistEditorRow extends Component { onSelectedChange={onSelectedChange} /> - - - + @@ -85,12 +84,12 @@ class ArtistEditorRow extends Component { } } -ArtistEditorRow.propTypes = { +AuthorEditorRow.propTypes = { id: PropTypes.number.isRequired, status: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, - artistName: PropTypes.string.isRequired, - artistType: PropTypes.string, + authorName: PropTypes.string.isRequired, + authorType: PropTypes.string, monitored: PropTypes.bool.isRequired, metadataProfile: PropTypes.object.isRequired, qualityProfile: PropTypes.object.isRequired, @@ -101,8 +100,8 @@ ArtistEditorRow.propTypes = { onSelectedChange: PropTypes.func.isRequired }; -ArtistEditorRow.defaultProps = { +AuthorEditorRow.defaultProps = { tags: [] }; -export default ArtistEditorRow; +export default AuthorEditorRow; diff --git a/frontend/src/Artist/Editor/ArtistEditorRowConnector.js b/frontend/src/Author/Editor/AuthorEditorRowConnector.js similarity index 76% rename from frontend/src/Artist/Editor/ArtistEditorRowConnector.js rename to frontend/src/Author/Editor/AuthorEditorRowConnector.js index 32694a6b9..21f5613f3 100644 --- a/frontend/src/Artist/Editor/ArtistEditorRowConnector.js +++ b/frontend/src/Author/Editor/AuthorEditorRowConnector.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createMetadataProfileSelector from 'Store/Selectors/createMetadataProfileSelector'; import createQualityProfileSelector from 'Store/Selectors/createQualityProfileSelector'; -import ArtistEditorRow from './ArtistEditorRow'; +import AuthorEditorRow from './AuthorEditorRow'; function createMapStateToProps() { return createSelector( @@ -19,16 +19,16 @@ function createMapStateToProps() { ); } -function ArtistEditorRowConnector(props) { +function AuthorEditorRowConnector(props) { return ( - ); } -ArtistEditorRowConnector.propTypes = { +AuthorEditorRowConnector.propTypes = { qualityProfileId: PropTypes.number.isRequired }; -export default connect(createMapStateToProps)(ArtistEditorRowConnector); +export default connect(createMapStateToProps)(AuthorEditorRowConnector); diff --git a/frontend/src/Search/Artist/AddNewArtistModal.js b/frontend/src/Author/Editor/Delete/DeleteAuthorModal.js similarity index 68% rename from frontend/src/Search/Artist/AddNewArtistModal.js rename to frontend/src/Author/Editor/Delete/DeleteAuthorModal.js index e94a8a229..39407a26e 100644 --- a/frontend/src/Search/Artist/AddNewArtistModal.js +++ b/frontend/src/Author/Editor/Delete/DeleteAuthorModal.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import AddNewArtistModalContentConnector from './AddNewArtistModalContentConnector'; +import DeleteAuthorModalContentConnector from './DeleteAuthorModalContentConnector'; -function AddNewArtistModal(props) { +function DeleteAuthorModal(props) { const { isOpen, onModalClose, @@ -15,7 +15,7 @@ function AddNewArtistModal(props) { isOpen={isOpen} onModalClose={onModalClose} > - @@ -23,9 +23,9 @@ function AddNewArtistModal(props) { ); } -AddNewArtistModal.propTypes = { +DeleteAuthorModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default AddNewArtistModal; +export default DeleteAuthorModal; diff --git a/frontend/src/Artist/Editor/Delete/DeleteArtistModalContent.css b/frontend/src/Author/Editor/Delete/DeleteAuthorModalContent.css similarity index 100% rename from frontend/src/Artist/Editor/Delete/DeleteArtistModalContent.css rename to frontend/src/Author/Editor/Delete/DeleteAuthorModalContent.css diff --git a/frontend/src/Artist/Editor/Delete/DeleteArtistModalContent.js b/frontend/src/Author/Editor/Delete/DeleteAuthorModalContent.js similarity index 77% rename from frontend/src/Artist/Editor/Delete/DeleteArtistModalContent.js rename to frontend/src/Author/Editor/Delete/DeleteAuthorModalContent.js index 87088b472..c30d786ad 100644 --- a/frontend/src/Artist/Editor/Delete/DeleteArtistModalContent.js +++ b/frontend/src/Author/Editor/Delete/DeleteAuthorModalContent.js @@ -9,9 +9,9 @@ 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 styles from './DeleteArtistModalContent.css'; +import styles from './DeleteAuthorModalContent.css'; -class DeleteArtistModalContent extends Component { +class DeleteAuthorModalContent extends Component { // // Lifecycle @@ -31,7 +31,7 @@ class DeleteArtistModalContent extends Component { this.setState({ deleteFiles: value }); } - onDeleteArtistConfirmed = () => { + onDeleteAuthorConfirmed = () => { const deleteFiles = this.state.deleteFiles; this.setState({ deleteFiles: false }); @@ -43,7 +43,7 @@ class DeleteArtistModalContent extends Component { render() { const { - artist, + author, onModalClose } = this.props; const deleteFiles = this.state.deleteFiles; @@ -51,19 +51,19 @@ class DeleteArtistModalContent extends Component { return ( - Delete Selected Artist + Delete Selected Author
    - {`Delete Artist Folder${artist.length > 1 ? 's' : ''}`} + {`Delete Author Folder${author.length > 1 ? 's' : ''}`} 1 ? 's' : ''} and all contents`} + helpText={`Delete Author Folder${author.length > 1 ? 's' : ''} and all contents`} kind={kinds.DANGER} onChange={this.onDeleteFilesChange} /> @@ -71,15 +71,15 @@ class DeleteArtistModalContent extends Component {
    - {`Are you sure you want to delete ${artist.length} selected artist${artist.length > 1 ? 's' : ''}${deleteFiles ? ' and all contents' : ''}?`} + {`Are you sure you want to delete ${author.length} selected author${author.length > 1 ? 's' : ''}${deleteFiles ? ' and all contents' : ''}?`}
      { - artist.map((s) => { + author.map((s) => { return ( -
    • - {s.artistName} +
    • + {s.authorName} { deleteFiles && @@ -104,7 +104,7 @@ class DeleteArtistModalContent extends Component { @@ -114,10 +114,10 @@ class DeleteArtistModalContent extends Component { } } -DeleteArtistModalContent.propTypes = { - artist: PropTypes.arrayOf(PropTypes.object).isRequired, +DeleteAuthorModalContent.propTypes = { + author: PropTypes.arrayOf(PropTypes.object).isRequired, onModalClose: PropTypes.func.isRequired, onDeleteSelectedPress: PropTypes.func.isRequired }; -export default DeleteArtistModalContent; +export default DeleteAuthorModalContent; diff --git a/frontend/src/Artist/Editor/Delete/DeleteArtistModalContentConnector.js b/frontend/src/Author/Editor/Delete/DeleteAuthorModalContentConnector.js similarity index 53% rename from frontend/src/Artist/Editor/Delete/DeleteArtistModalContentConnector.js rename to frontend/src/Author/Editor/Delete/DeleteAuthorModalContentConnector.js index 6479f0bd7..5bebec7aa 100644 --- a/frontend/src/Artist/Editor/Delete/DeleteArtistModalContentConnector.js +++ b/frontend/src/Author/Editor/Delete/DeleteAuthorModalContentConnector.js @@ -1,29 +1,29 @@ import _ from 'lodash'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector'; -import { bulkDeleteArtist } from 'Store/Actions/artistEditorActions'; -import DeleteArtistModalContent from './DeleteArtistModalContent'; +import createAllAuthorSelector from 'Store/Selectors/createAllAuthorsSelector'; +import { bulkDeleteAuthor } from 'Store/Actions/authorEditorActions'; +import DeleteAuthorModalContent from './DeleteAuthorModalContent'; function createMapStateToProps() { return createSelector( (state, { authorIds }) => authorIds, - createAllArtistSelector(), - (authorIds, allArtists) => { - const selectedArtist = _.intersectionWith(allArtists, authorIds, (s, id) => { + createAllAuthorSelector(), + (authorIds, allAuthors) => { + const selectedAuthor = _.intersectionWith(allAuthors, authorIds, (s, id) => { return s.id === id; }); - const sortedArtist = _.orderBy(selectedArtist, 'sortName'); - const artist = _.map(sortedArtist, (s) => { + const sortedAuthor = _.orderBy(selectedAuthor, 'sortName'); + const author = _.map(sortedAuthor, (s) => { return { - artistName: s.artistName, + authorName: s.authorName, path: s.path }; }); return { - artist + author }; } ); @@ -32,7 +32,7 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { onDeleteSelectedPress(deleteFiles) { - dispatch(bulkDeleteArtist({ + dispatch(bulkDeleteAuthor({ authorIds: props.authorIds, deleteFiles })); @@ -42,4 +42,4 @@ function createMapDispatchToProps(dispatch, props) { }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(DeleteArtistModalContent); +export default connect(createMapStateToProps, createMapDispatchToProps)(DeleteAuthorModalContent); diff --git a/frontend/src/Artist/Editor/Organize/OrganizeArtistModal.js b/frontend/src/Author/Editor/Organize/OrganizeAuthorModal.js similarity index 64% rename from frontend/src/Artist/Editor/Organize/OrganizeArtistModal.js rename to frontend/src/Author/Editor/Organize/OrganizeAuthorModal.js index 412396355..0e3791d45 100644 --- a/frontend/src/Artist/Editor/Organize/OrganizeArtistModal.js +++ b/frontend/src/Author/Editor/Organize/OrganizeAuthorModal.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import OrganizeArtistModalContentConnector from './OrganizeArtistModalContentConnector'; +import OrganizeAuthorModalContentConnector from './OrganizeAuthorModalContentConnector'; -function OrganizeArtistModal(props) { +function OrganizeAuthorModal(props) { const { isOpen, onModalClose, @@ -15,7 +15,7 @@ function OrganizeArtistModal(props) { isOpen={isOpen} onModalClose={onModalClose} > - @@ -23,9 +23,9 @@ function OrganizeArtistModal(props) { ); } -OrganizeArtistModal.propTypes = { +OrganizeAuthorModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default OrganizeArtistModal; +export default OrganizeAuthorModal; diff --git a/frontend/src/Artist/Editor/Organize/OrganizeArtistModalContent.css b/frontend/src/Author/Editor/Organize/OrganizeAuthorModalContent.css similarity index 100% rename from frontend/src/Artist/Editor/Organize/OrganizeArtistModalContent.css rename to frontend/src/Author/Editor/Organize/OrganizeAuthorModalContent.css diff --git a/frontend/src/Artist/Editor/Organize/OrganizeArtistModalContent.js b/frontend/src/Author/Editor/Organize/OrganizeAuthorModalContent.js similarity index 66% rename from frontend/src/Artist/Editor/Organize/OrganizeArtistModalContent.js rename to frontend/src/Author/Editor/Organize/OrganizeAuthorModalContent.js index 5f90eca90..e1aa9b47d 100644 --- a/frontend/src/Artist/Editor/Organize/OrganizeArtistModalContent.js +++ b/frontend/src/Author/Editor/Organize/OrganizeAuthorModalContent.js @@ -8,24 +8,24 @@ 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 styles from './OrganizeArtistModalContent.css'; +import styles from './OrganizeAuthorModalContent.css'; -function OrganizeArtistModalContent(props) { +function OrganizeAuthorModalContent(props) { const { - artistNames, + authorNames, onModalClose, - onOrganizeArtistPress + onOrganizeAuthorPress } = props; return ( - Organize Selected Artist + Organize Selected Author - Tip: To preview a rename... select "Cancel" then click any artist name and use the + Tip: To preview a rename... select "Cancel" then click any author name and use the
      - Are you sure you want to organize all files in the {artistNames.length} selected artist? + Are you sure you want to organize all files in the {authorNames.length} selected author?
        { - artistNames.map((artistName) => { + authorNames.map((authorName) => { return ( -
      • - {artistName} +
      • + {authorName}
      • ); }) @@ -56,7 +56,7 @@ function OrganizeArtistModalContent(props) { @@ -65,10 +65,10 @@ function OrganizeArtistModalContent(props) { ); } -OrganizeArtistModalContent.propTypes = { - artistNames: PropTypes.arrayOf(PropTypes.string).isRequired, +OrganizeAuthorModalContent.propTypes = { + authorNames: PropTypes.arrayOf(PropTypes.string).isRequired, onModalClose: PropTypes.func.isRequired, - onOrganizeArtistPress: PropTypes.func.isRequired + onOrganizeAuthorPress: PropTypes.func.isRequired }; -export default OrganizeArtistModalContent; +export default OrganizeAuthorModalContent; diff --git a/frontend/src/Artist/Editor/Organize/OrganizeArtistModalContentConnector.js b/frontend/src/Author/Editor/Organize/OrganizeAuthorModalContentConnector.js similarity index 57% rename from frontend/src/Artist/Editor/Organize/OrganizeArtistModalContentConnector.js rename to frontend/src/Author/Editor/Organize/OrganizeAuthorModalContentConnector.js index 64fe4c09c..b1c45e864 100644 --- a/frontend/src/Artist/Editor/Organize/OrganizeArtistModalContentConnector.js +++ b/frontend/src/Author/Editor/Organize/OrganizeAuthorModalContentConnector.js @@ -3,25 +3,25 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector'; +import createAllAuthorSelector from 'Store/Selectors/createAllAuthorsSelector'; import { executeCommand } from 'Store/Actions/commandActions'; import * as commandNames from 'Commands/commandNames'; -import OrganizeArtistModalContent from './OrganizeArtistModalContent'; +import OrganizeAuthorModalContent from './OrganizeAuthorModalContent'; function createMapStateToProps() { return createSelector( (state, { authorIds }) => authorIds, - createAllArtistSelector(), - (authorIds, allArtists) => { - const artist = _.intersectionWith(allArtists, authorIds, (s, id) => { + createAllAuthorSelector(), + (authorIds, allAuthors) => { + const author = _.intersectionWith(allAuthors, authorIds, (s, id) => { return s.id === id; }); - const sortedArtist = _.orderBy(artist, 'sortName'); - const artistNames = _.map(sortedArtist, 'artistName'); + const sortedAuthor = _.orderBy(author, 'sortName'); + const authorNames = _.map(sortedAuthor, 'authorName'); return { - artistNames + authorNames }; } ); @@ -31,14 +31,14 @@ const mapDispatchToProps = { executeCommand }; -class OrganizeArtistModalContentConnector extends Component { +class OrganizeAuthorModalContentConnector extends Component { // // Listeners - onOrganizeArtistPress = () => { + onOrganizeAuthorPress = () => { this.props.executeCommand({ - name: commandNames.RENAME_ARTIST, + name: commandNames.RENAME_AUTHOR, authorIds: this.props.authorIds }); @@ -50,18 +50,18 @@ class OrganizeArtistModalContentConnector extends Component { render(props) { return ( - ); } } -OrganizeArtistModalContentConnector.propTypes = { +OrganizeAuthorModalContentConnector.propTypes = { authorIds: PropTypes.arrayOf(PropTypes.number).isRequired, onModalClose: PropTypes.func.isRequired, executeCommand: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(OrganizeArtistModalContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(OrganizeAuthorModalContentConnector); diff --git a/frontend/src/Artist/Editor/Tags/TagsModal.js b/frontend/src/Author/Editor/Tags/TagsModal.js similarity index 100% rename from frontend/src/Artist/Editor/Tags/TagsModal.js rename to frontend/src/Author/Editor/Tags/TagsModal.js diff --git a/frontend/src/Artist/Editor/Tags/TagsModalContent.css b/frontend/src/Author/Editor/Tags/TagsModalContent.css similarity index 100% rename from frontend/src/Artist/Editor/Tags/TagsModalContent.css rename to frontend/src/Author/Editor/Tags/TagsModalContent.css diff --git a/frontend/src/Artist/Editor/Tags/TagsModalContent.js b/frontend/src/Author/Editor/Tags/TagsModalContent.js similarity index 95% rename from frontend/src/Artist/Editor/Tags/TagsModalContent.js rename to frontend/src/Author/Editor/Tags/TagsModalContent.js index b982fee0e..b1cad8a39 100644 --- a/frontend/src/Artist/Editor/Tags/TagsModalContent.js +++ b/frontend/src/Author/Editor/Tags/TagsModalContent.js @@ -49,7 +49,7 @@ class TagsModalContent extends Component { render() { const { - artistTags, + authorTags, tagList, onModalClose } = this.props; @@ -93,7 +93,7 @@ class TagsModalContent extends Component { value={applyTags} values={applyTagsOptions} helpTexts={[ - 'How to apply tags to the selected artist', + 'How to apply tags to the selected author', 'Add: Add the tags the existing list of tags', 'Remove: Remove the entered tags', 'Replace: Replace the tags with the entered tags (enter no tags to clear all tags)' @@ -107,7 +107,7 @@ class TagsModalContent extends Component {
        { - artistTags.map((t) => { + authorTags.map((t) => { const tag = _.find(tagList, { id: t }); if (!tag) { @@ -139,7 +139,7 @@ class TagsModalContent extends Component { return null; } - if (artistTags.indexOf(t) > -1) { + if (authorTags.indexOf(t) > -1) { return null; } @@ -178,7 +178,7 @@ class TagsModalContent extends Component { } TagsModalContent.propTypes = { - artistTags: PropTypes.arrayOf(PropTypes.number).isRequired, + authorTags: PropTypes.arrayOf(PropTypes.number).isRequired, tagList: PropTypes.arrayOf(PropTypes.object).isRequired, onModalClose: PropTypes.func.isRequired, onApplyTagsPress: PropTypes.func.isRequired diff --git a/frontend/src/Artist/Editor/Tags/TagsModalContentConnector.js b/frontend/src/Author/Editor/Tags/TagsModalContentConnector.js similarity index 69% rename from frontend/src/Artist/Editor/Tags/TagsModalContentConnector.js rename to frontend/src/Author/Editor/Tags/TagsModalContentConnector.js index 85b076706..3066ba046 100644 --- a/frontend/src/Artist/Editor/Tags/TagsModalContentConnector.js +++ b/frontend/src/Author/Editor/Tags/TagsModalContentConnector.js @@ -1,24 +1,24 @@ import _ from 'lodash'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector'; +import createAllAuthorSelector from 'Store/Selectors/createAllAuthorsSelector'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; import TagsModalContent from './TagsModalContent'; function createMapStateToProps() { return createSelector( (state, { authorIds }) => authorIds, - createAllArtistSelector(), + createAllAuthorSelector(), createTagsSelector(), - (authorIds, allArtists, tagList) => { - const artist = _.intersectionWith(allArtists, authorIds, (s, id) => { + (authorIds, allAuthors, tagList) => { + const author = _.intersectionWith(allAuthors, authorIds, (s, id) => { return s.id === id; }); - const artistTags = _.uniq(_.concat(..._.map(artist, 'tags'))); + const authorTags = _.uniq(_.concat(..._.map(author, 'tags'))); return { - artistTags, + authorTags, tagList }; } diff --git a/frontend/src/Artist/History/ArtistHistoryContentConnector.js b/frontend/src/Author/History/AuthorHistoryContentConnector.js similarity index 60% rename from frontend/src/Artist/History/ArtistHistoryContentConnector.js rename to frontend/src/Author/History/AuthorHistoryContentConnector.js index ab5b38ba5..10b099e4d 100644 --- a/frontend/src/Artist/History/ArtistHistoryContentConnector.js +++ b/frontend/src/Author/History/AuthorHistoryContentConnector.js @@ -2,24 +2,24 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { fetchArtistHistory, clearArtistHistory, artistHistoryMarkAsFailed } from 'Store/Actions/artistHistoryActions'; +import { authorHistoryMarkAsFailed, clearAuthorHistory, fetchAuthorHistory } from 'Store/Actions/authorHistoryActions'; function createMapStateToProps() { return createSelector( - (state) => state.artistHistory, - (artistHistory) => { - return artistHistory; + (state) => state.authorHistory, + (authorHistory) => { + return authorHistory; } ); } const mapDispatchToProps = { - fetchArtistHistory, - clearArtistHistory, - artistHistoryMarkAsFailed + fetchAuthorHistory, + clearAuthorHistory, + authorHistoryMarkAsFailed }; -class ArtistHistoryContentConnector extends Component { +class AuthorHistoryContentConnector extends Component { // // Lifecycle @@ -30,14 +30,14 @@ class ArtistHistoryContentConnector extends Component { bookId } = this.props; - this.props.fetchArtistHistory({ + this.props.fetchAuthorHistory({ authorId, bookId }); } componentWillUnmount() { - this.props.clearArtistHistory(); + this.props.clearAuthorHistory(); } // @@ -49,7 +49,7 @@ class ArtistHistoryContentConnector extends Component { bookId } = this.props; - this.props.artistHistoryMarkAsFailed({ + this.props.authorHistoryMarkAsFailed({ historyId, authorId, bookId @@ -74,13 +74,13 @@ class ArtistHistoryContentConnector extends Component { } } -ArtistHistoryContentConnector.propTypes = { +AuthorHistoryContentConnector.propTypes = { component: PropTypes.elementType.isRequired, authorId: PropTypes.number.isRequired, bookId: PropTypes.number, - fetchArtistHistory: PropTypes.func.isRequired, - clearArtistHistory: PropTypes.func.isRequired, - artistHistoryMarkAsFailed: PropTypes.func.isRequired + fetchAuthorHistory: PropTypes.func.isRequired, + clearAuthorHistory: PropTypes.func.isRequired, + authorHistoryMarkAsFailed: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(ArtistHistoryContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(AuthorHistoryContentConnector); diff --git a/frontend/src/Artist/History/ArtistHistoryModal.js b/frontend/src/Author/History/AuthorHistoryModal.js similarity index 59% rename from frontend/src/Artist/History/ArtistHistoryModal.js rename to frontend/src/Author/History/AuthorHistoryModal.js index ba6d61aa9..eb197bf7a 100644 --- a/frontend/src/Artist/History/ArtistHistoryModal.js +++ b/frontend/src/Author/History/AuthorHistoryModal.js @@ -1,10 +1,10 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import ArtistHistoryContentConnector from './ArtistHistoryContentConnector'; -import ArtistHistoryModalContent from './ArtistHistoryModalContent'; +import AuthorHistoryContentConnector from './AuthorHistoryContentConnector'; +import AuthorHistoryModalContent from './AuthorHistoryModalContent'; -function ArtistHistoryModal(props) { +function AuthorHistoryModal(props) { const { isOpen, onModalClose, @@ -16,8 +16,8 @@ function ArtistHistoryModal(props) { isOpen={isOpen} onModalClose={onModalClose} > - @@ -25,9 +25,9 @@ function ArtistHistoryModal(props) { ); } -ArtistHistoryModal.propTypes = { +AuthorHistoryModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default ArtistHistoryModal; +export default AuthorHistoryModal; diff --git a/frontend/src/Artist/History/ArtistHistoryModalContent.js b/frontend/src/Author/History/AuthorHistoryModalContent.js similarity index 78% rename from frontend/src/Artist/History/ArtistHistoryModalContent.js rename to frontend/src/Author/History/AuthorHistoryModalContent.js index 44a76389d..a419736f8 100644 --- a/frontend/src/Artist/History/ArtistHistoryModalContent.js +++ b/frontend/src/Author/History/AuthorHistoryModalContent.js @@ -5,9 +5,9 @@ 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 ArtistHistoryTableContent from './ArtistHistoryTableContent'; +import AuthorHistoryTableContent from './AuthorHistoryTableContent'; -class ArtistHistoryModalContent extends Component { +class AuthorHistoryModalContent extends Component { // // Render @@ -24,7 +24,7 @@ class ArtistHistoryModalContent extends Component { - @@ -39,8 +39,8 @@ class ArtistHistoryModalContent extends Component { } } -ArtistHistoryModalContent.propTypes = { +AuthorHistoryModalContent.propTypes = { onModalClose: PropTypes.func.isRequired }; -export default ArtistHistoryModalContent; +export default AuthorHistoryModalContent; diff --git a/frontend/src/Artist/History/ArtistHistoryRow.css b/frontend/src/Author/History/AuthorHistoryRow.css similarity index 100% rename from frontend/src/Artist/History/ArtistHistoryRow.css rename to frontend/src/Author/History/AuthorHistoryRow.css diff --git a/frontend/src/Artist/History/ArtistHistoryRow.js b/frontend/src/Author/History/AuthorHistoryRow.js similarity index 83% rename from frontend/src/Artist/History/ArtistHistoryRow.js rename to frontend/src/Author/History/AuthorHistoryRow.js index e69f8395b..428080c1b 100644 --- a/frontend/src/Artist/History/ArtistHistoryRow.js +++ b/frontend/src/Author/History/AuthorHistoryRow.js @@ -8,10 +8,10 @@ import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellCo import TableRow from 'Components/Table/TableRow'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import Popover from 'Components/Tooltip/Popover'; -import TrackQuality from 'Album/TrackQuality'; +import BookQuality from 'Book/BookQuality'; import HistoryDetailsConnector from 'Activity/History/Details/HistoryDetailsConnector'; import HistoryEventTypeCell from 'Activity/History/HistoryEventTypeCell'; -import styles from './ArtistHistoryRow.css'; +import styles from './AuthorHistoryRow.css'; function getTitle(eventType) { switch (eventType) { @@ -19,24 +19,24 @@ function getTitle(eventType) { return 'Grabbed'; case 'downloadImported': return 'Download Completed'; - case 'trackFileImported': - return 'Track Imported'; + case 'bookFileImported': + return 'Book Imported'; case 'downloadFailed': return 'Download Failed'; - case 'trackFileDeleted': - return 'Track File Deleted'; - case 'trackFileRenamed': - return 'Track File Renamed'; - case 'trackFileRetagged': - return 'Track File Tags Updated'; - case 'albumImportIncomplete': - return 'Album Import Incomplete'; + case 'bookFileDeleted': + return 'Book File Deleted'; + case 'bookFileRenamed': + return 'Book File Renamed'; + case 'bookFileRetagged': + return 'Book File Tags Updated'; + case 'bookImportIncomplete': + return 'Book Import Incomplete'; default: return 'Unknown'; } } -class ArtistHistoryRow extends Component { +class AuthorHistoryRow extends Component { // // Lifecycle @@ -76,7 +76,7 @@ class ArtistHistoryRow extends Component { qualityCutoffNotMet, date, data, - album + book } = this.props; const { @@ -91,7 +91,7 @@ class ArtistHistoryRow extends Component { /> - {album.title} + {book.title} @@ -99,7 +99,7 @@ class ArtistHistoryRow extends Component { - @@ -153,7 +153,7 @@ class ArtistHistoryRow extends Component { } } -ArtistHistoryRow.propTypes = { +AuthorHistoryRow.propTypes = { id: PropTypes.number.isRequired, eventType: PropTypes.string.isRequired, sourceTitle: PropTypes.string.isRequired, @@ -161,10 +161,10 @@ ArtistHistoryRow.propTypes = { qualityCutoffNotMet: PropTypes.bool.isRequired, date: PropTypes.string.isRequired, data: PropTypes.object.isRequired, - fullArtist: PropTypes.bool.isRequired, - artist: PropTypes.object.isRequired, - album: PropTypes.object.isRequired, + fullAuthor: PropTypes.bool.isRequired, + author: PropTypes.object.isRequired, + book: PropTypes.object.isRequired, onMarkAsFailedPress: PropTypes.func.isRequired }; -export default ArtistHistoryRow; +export default AuthorHistoryRow; diff --git a/frontend/src/Artist/History/ArtistHistoryRowConnector.js b/frontend/src/Author/History/AuthorHistoryRowConnector.js similarity index 55% rename from frontend/src/Artist/History/ArtistHistoryRowConnector.js rename to frontend/src/Author/History/AuthorHistoryRowConnector.js index 2bcfc7cb6..e08e05190 100644 --- a/frontend/src/Artist/History/ArtistHistoryRowConnector.js +++ b/frontend/src/Author/History/AuthorHistoryRowConnector.js @@ -1,18 +1,18 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { fetchHistory, markAsFailed } from 'Store/Actions/historyActions'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; -import createAlbumSelector from 'Store/Selectors/createAlbumSelector'; -import ArtistHistoryRow from './ArtistHistoryRow'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; +import createBookSelector from 'Store/Selectors/createBookSelector'; +import AuthorHistoryRow from './AuthorHistoryRow'; function createMapStateToProps() { return createSelector( - createArtistSelector(), - createAlbumSelector(), - (artist, album) => { + createAuthorSelector(), + createBookSelector(), + (author, book) => { return { - artist, - album + author, + book }; } ); @@ -23,4 +23,4 @@ const mapDispatchToProps = { markAsFailed }; -export default connect(createMapStateToProps, mapDispatchToProps)(ArtistHistoryRow); +export default connect(createMapStateToProps, mapDispatchToProps)(AuthorHistoryRow); diff --git a/frontend/src/Author/History/AuthorHistoryTable.js b/frontend/src/Author/History/AuthorHistoryTable.js new file mode 100644 index 000000000..c92c40751 --- /dev/null +++ b/frontend/src/Author/History/AuthorHistoryTable.js @@ -0,0 +1,21 @@ +import React from 'react'; +import AuthorHistoryContentConnector from 'Author/History/AuthorHistoryContentConnector'; +import AuthorHistoryTableContent from 'Author/History/AuthorHistoryTableContent'; + +function AuthorHistoryTable(props) { + const { + ...otherProps + } = props; + + return ( + + ); +} + +AuthorHistoryTable.propTypes = { +}; + +export default AuthorHistoryTable; diff --git a/frontend/src/Artist/History/ArtistHistoryTableContent.js b/frontend/src/Author/History/AuthorHistoryTableContent.js similarity index 84% rename from frontend/src/Artist/History/ArtistHistoryTableContent.js rename to frontend/src/Author/History/AuthorHistoryTableContent.js index 03ec5eea6..15c39dd03 100644 --- a/frontend/src/Artist/History/ArtistHistoryTableContent.js +++ b/frontend/src/Author/History/AuthorHistoryTableContent.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; -import ArtistHistoryRowConnector from './ArtistHistoryRowConnector'; +import AuthorHistoryRowConnector from './AuthorHistoryRowConnector'; const columns = [ { @@ -11,8 +11,8 @@ const columns = [ isVisible: true }, { - name: 'album', - label: 'Album', + name: 'book', + label: 'Book', isVisible: true }, { @@ -42,7 +42,7 @@ const columns = [ } ]; -class ArtistHistoryTableContent extends Component { +class AuthorHistoryTableContent extends Component { // // Render @@ -57,7 +57,7 @@ class ArtistHistoryTableContent extends Component { onMarkAsFailedPress } = this.props; - const fullArtist = bookId == null; + const fullAuthor = bookId == null; const hasItems = !!items.length; return ( @@ -84,9 +84,9 @@ class ArtistHistoryTableContent extends Component { { items.map((item) => { return ( - @@ -101,7 +101,7 @@ class ArtistHistoryTableContent extends Component { } } -ArtistHistoryTableContent.propTypes = { +AuthorHistoryTableContent.propTypes = { bookId: PropTypes.number, isFetching: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired, @@ -110,4 +110,4 @@ ArtistHistoryTableContent.propTypes = { onMarkAsFailedPress: PropTypes.func.isRequired }; -export default ArtistHistoryTableContent; +export default AuthorHistoryTableContent; diff --git a/frontend/src/Artist/Index/ArtistIndex.css b/frontend/src/Author/Index/AuthorIndex.css similarity index 100% rename from frontend/src/Artist/Index/ArtistIndex.css rename to frontend/src/Author/Index/AuthorIndex.css diff --git a/frontend/src/Artist/Index/ArtistIndex.js b/frontend/src/Author/Index/AuthorIndex.js similarity index 81% rename from frontend/src/Artist/Index/ArtistIndex.js rename to frontend/src/Author/Index/AuthorIndex.js index e250d61f5..6c41db5e4 100644 --- a/frontend/src/Artist/Index/ArtistIndex.js +++ b/frontend/src/Author/Index/AuthorIndex.js @@ -13,38 +13,38 @@ import PageToolbar from 'Components/Page/Toolbar/PageToolbar'; import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator'; import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton'; -import NoArtist from 'Artist/NoArtist'; -import ArtistIndexTableConnector from './Table/ArtistIndexTableConnector'; -import ArtistIndexTableOptionsConnector from './Table/ArtistIndexTableOptionsConnector'; -import ArtistIndexPosterOptionsModal from './Posters/Options/ArtistIndexPosterOptionsModal'; -import ArtistIndexPostersConnector from './Posters/ArtistIndexPostersConnector'; -import ArtistIndexBannerOptionsModal from './Banners/Options/ArtistIndexBannerOptionsModal'; -import ArtistIndexBannersConnector from './Banners/ArtistIndexBannersConnector'; -import ArtistIndexOverviewOptionsModal from './Overview/Options/ArtistIndexOverviewOptionsModal'; -import ArtistIndexOverviewsConnector from './Overview/ArtistIndexOverviewsConnector'; -import ArtistIndexFooterConnector from './ArtistIndexFooterConnector'; -import ArtistIndexFilterMenu from './Menus/ArtistIndexFilterMenu'; -import ArtistIndexSortMenu from './Menus/ArtistIndexSortMenu'; -import ArtistIndexViewMenu from './Menus/ArtistIndexViewMenu'; -import styles from './ArtistIndex.css'; +import NoAuthor from 'Author/NoAuthor'; +import AuthorIndexTableConnector from './Table/AuthorIndexTableConnector'; +import AuthorIndexTableOptionsConnector from './Table/AuthorIndexTableOptionsConnector'; +import AuthorIndexPosterOptionsModal from './Posters/Options/AuthorIndexPosterOptionsModal'; +import AuthorIndexPostersConnector from './Posters/AuthorIndexPostersConnector'; +import AuthorIndexBannerOptionsModal from './Banners/Options/AuthorIndexBannerOptionsModal'; +import AuthorIndexBannersConnector from './Banners/AuthorIndexBannersConnector'; +import AuthorIndexOverviewOptionsModal from './Overview/Options/AuthorIndexOverviewOptionsModal'; +import AuthorIndexOverviewsConnector from './Overview/AuthorIndexOverviewsConnector'; +import AuthorIndexFooterConnector from './AuthorIndexFooterConnector'; +import AuthorIndexFilterMenu from './Menus/AuthorIndexFilterMenu'; +import AuthorIndexSortMenu from './Menus/AuthorIndexSortMenu'; +import AuthorIndexViewMenu from './Menus/AuthorIndexViewMenu'; +import styles from './AuthorIndex.css'; function getViewComponent(view) { if (view === 'posters') { - return ArtistIndexPostersConnector; + return AuthorIndexPostersConnector; } if (view === 'banners') { - return ArtistIndexBannersConnector; + return AuthorIndexBannersConnector; } if (view === 'overview') { - return ArtistIndexOverviewsConnector; + return AuthorIndexOverviewsConnector; } - return ArtistIndexTableConnector; + return AuthorIndexTableConnector; } -class ArtistIndex extends Component { +class AuthorIndex extends Component { // // Lifecycle @@ -184,13 +184,13 @@ class ArtistIndex extends Component { sortKey, sortDirection, view, - isRefreshingArtist, + isRefreshingAuthor, isRssSyncExecuting, onScroll, onSortSelect, onFilterSelect, onViewSelect, - onRefreshArtistPress, + onRefreshAuthorPress, onRssSyncPress, ...otherProps } = this.props; @@ -206,7 +206,7 @@ class ArtistIndex extends Component { const ViewComponent = getViewComponent(view); const isLoaded = !!(!error && isPopulated && items.length && scroller); - const hasNoArtist = !totalItems; + const hasNoAuthor = !totalItems; return ( @@ -216,15 +216,15 @@ class ArtistIndex extends Component { label="Update all" iconName={icons.REFRESH} spinningName={icons.REFRESH} - isSpinning={isRefreshingArtist} - onPress={onRefreshArtistPress} + isSpinning={isRefreshingAuthor} + onPress={onRefreshAuthorPress} /> @@ -239,7 +239,7 @@ class ArtistIndex extends Component { : null @@ -265,7 +265,7 @@ class ArtistIndex extends Component { : null @@ -276,7 +276,7 @@ class ArtistIndex extends Component { : null @@ -288,24 +288,24 @@ class ArtistIndex extends Component { } - - - @@ -326,7 +326,7 @@ class ArtistIndex extends Component { { !isFetching && !!error &&
        - {getErrorMessage(error, 'Failed to load artist from API')} + {getErrorMessage(error, 'Failed to load author from API')}
        } @@ -343,13 +343,13 @@ class ArtistIndex extends Component { {...otherProps} /> - +
        } { !error && isPopulated && !items.length && - + } @@ -362,18 +362,18 @@ class ArtistIndex extends Component { }
    - - - { return { - ...artist, - isRefreshingArtist, + ...author, + isRefreshingAuthor, isRssSyncExecuting, isSmallScreen: dimensionsState.isSmallScreen }; @@ -38,24 +39,24 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { onTableOptionChange(payload) { - dispatch(setArtistTableOption(payload)); + dispatch(setAuthorTableOption(payload)); }, onSortSelect(sortKey) { - dispatch(setArtistSort({ sortKey })); + dispatch(setAuthorSort({ sortKey })); }, onFilterSelect(selectedFilterKey) { - dispatch(setArtistFilter({ selectedFilterKey })); + dispatch(setAuthorFilter({ selectedFilterKey })); }, - dispatchSetArtistView(view) { - dispatch(setArtistView({ view })); + dispatchSetAuthorView(view) { + dispatch(setAuthorView({ view })); }, - onRefreshArtistPress() { + onRefreshAuthorPress() { dispatch(executeCommand({ - name: commandNames.REFRESH_ARTIST + name: commandNames.REFRESH_AUTHOR })); }, @@ -67,17 +68,17 @@ function createMapDispatchToProps(dispatch, props) { }; } -class ArtistIndexConnector extends Component { +class AuthorIndexConnector extends Component { // // Listeners onViewSelect = (view) => { - this.props.dispatchSetArtistView(view); + this.props.dispatchSetAuthorView(view); } onScroll = ({ scrollTop }) => { - scrollPositions.artistIndex = scrollTop; + scrollPositions.authorIndex = scrollTop; } // @@ -85,7 +86,7 @@ class ArtistIndexConnector extends Component { render() { return ( - state.artist.items, - (state) => state.artistIndex.filterBuilderProps, + (state) => state.authors.items, + (state) => state.authorIndex.filterBuilderProps, (sectionItems, filterBuilderProps) => { return { sectionItems, filterBuilderProps, - customFilterType: 'artistIndex' + customFilterType: 'authorIndex' }; } ); } const mapDispatchToProps = { - dispatchSetFilter: setArtistFilter + dispatchSetFilter: setAuthorFilter }; export default connect(createMapStateToProps, mapDispatchToProps)(FilterModal); diff --git a/frontend/src/Artist/Index/ArtistIndexFooter.css b/frontend/src/Author/Index/AuthorIndexFooter.css similarity index 100% rename from frontend/src/Artist/Index/ArtistIndexFooter.css rename to frontend/src/Author/Index/AuthorIndexFooter.css diff --git a/frontend/src/Artist/Index/ArtistIndexFooter.js b/frontend/src/Author/Index/AuthorIndexFooter.js similarity index 87% rename from frontend/src/Artist/Index/ArtistIndexFooter.js rename to frontend/src/Author/Index/AuthorIndexFooter.js index 6744d0964..611c07692 100644 --- a/frontend/src/Artist/Index/ArtistIndexFooter.js +++ b/frontend/src/Author/Index/AuthorIndexFooter.js @@ -5,34 +5,34 @@ import formatBytes from 'Utilities/Number/formatBytes'; import { ColorImpairedConsumer } from 'App/ColorImpairedContext'; import DescriptionList from 'Components/DescriptionList/DescriptionList'; import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem'; -import styles from './ArtistIndexFooter.css'; +import styles from './AuthorIndexFooter.css'; -class ArtistIndexFooter extends PureComponent { +class AuthorIndexFooter extends PureComponent { // // Render render() { - const { artist } = this.props; - const count = artist.length; - let tracks = 0; - let trackFiles = 0; + const { author } = this.props; + const count = author.length; + let books = 0; + let bookFiles = 0; let ended = 0; let continuing = 0; let monitored = 0; let totalFileSize = 0; - artist.forEach((s) => { + author.forEach((s) => { const { statistics = {} } = s; const { - trackCount = 0, - trackFileCount = 0, + bookCount = 0, + bookFileCount = 0, sizeOnDisk = 0 } = statistics; - tracks += trackCount; - trackFiles += trackFileCount; + books += bookCount; + bookFiles += bookFileCount; if (s.status === 'ended') { ended++; @@ -127,12 +127,12 @@ class ArtistIndexFooter extends PureComponent { @@ -151,8 +151,8 @@ class ArtistIndexFooter extends PureComponent { } } -ArtistIndexFooter.propTypes = { - artist: PropTypes.arrayOf(PropTypes.object).isRequired +AuthorIndexFooter.propTypes = { + author: PropTypes.arrayOf(PropTypes.object).isRequired }; -export default ArtistIndexFooter; +export default AuthorIndexFooter; diff --git a/frontend/src/Artist/Index/ArtistIndexFooterConnector.js b/frontend/src/Author/Index/AuthorIndexFooterConnector.js similarity index 66% rename from frontend/src/Artist/Index/ArtistIndexFooterConnector.js rename to frontend/src/Author/Index/AuthorIndexFooterConnector.js index 9d7afc298..3d82446b7 100644 --- a/frontend/src/Artist/Index/ArtistIndexFooterConnector.js +++ b/frontend/src/Author/Index/AuthorIndexFooterConnector.js @@ -2,13 +2,13 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createDeepEqualSelector from 'Store/Selectors/createDeepEqualSelector'; import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector'; -import ArtistIndexFooter from './ArtistIndexFooter'; +import AuthorIndexFooter from './AuthorIndexFooter'; function createUnoptimizedSelector() { return createSelector( - createClientSideCollectionSelector('artist', 'artistIndex'), - (artist) => { - return artist.items.map((s) => { + createClientSideCollectionSelector('authors', 'authorIndex'), + (authors) => { + return authors.items.map((s) => { const { monitored, status, @@ -25,22 +25,22 @@ function createUnoptimizedSelector() { ); } -function createArtistSelector() { +function createAuthorSelector() { return createDeepEqualSelector( createUnoptimizedSelector(), - (artist) => artist + (author) => author ); } function createMapStateToProps() { return createSelector( - createArtistSelector(), - (artist) => { + createAuthorSelector(), + (author) => { return { - artist + author }; } ); } -export default connect(createMapStateToProps)(ArtistIndexFooter); +export default connect(createMapStateToProps)(AuthorIndexFooter); diff --git a/frontend/src/Artist/Index/ArtistIndexItemConnector.js b/frontend/src/Author/Index/AuthorIndexItemConnector.js similarity index 53% rename from frontend/src/Artist/Index/ArtistIndexItemConnector.js rename to frontend/src/Author/Index/AuthorIndexItemConnector.js index dd3dff70c..ca22565aa 100644 --- a/frontend/src/Artist/Index/ArtistIndexItemConnector.js +++ b/frontend/src/Author/Index/AuthorIndexItemConnector.js @@ -4,28 +4,28 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createExecutingCommandsSelector from 'Store/Selectors/createExecutingCommandsSelector'; -import createArtistQualityProfileSelector from 'Store/Selectors/createArtistQualityProfileSelector'; -import createArtistMetadataProfileSelector from 'Store/Selectors/createArtistMetadataProfileSelector'; +import createAuthorQualityProfileSelector from 'Store/Selectors/createAuthorQualityProfileSelector'; +import createAuthorMetadataProfileSelector from 'Store/Selectors/createAuthorMetadataProfileSelector'; import { executeCommand } from 'Store/Actions/commandActions'; import * as commandNames from 'Commands/commandNames'; function selectShowSearchAction() { return createSelector( - (state) => state.artistIndex, - (artistIndex) => { - const view = artistIndex.view; + (state) => state.authorIndex, + (authorIndex) => { + const view = authorIndex.view; switch (view) { case 'posters': - return artistIndex.posterOptions.showSearchAction; + return authorIndex.posterOptions.showSearchAction; case 'banners': - return artistIndex.bannerOptions.showSearchAction; + return authorIndex.bannerOptions.showSearchAction; case 'overview': - return artistIndex.overviewOptions.showSearchAction; + return authorIndex.overviewOptions.showSearchAction; default: - return artistIndex.tableOptions.showSearchAction; + return authorIndex.tableOptions.showSearchAction; } } ); @@ -33,52 +33,52 @@ function selectShowSearchAction() { function createMapStateToProps() { return createSelector( - createArtistSelector(), - createArtistQualityProfileSelector(), - createArtistMetadataProfileSelector(), + createAuthorSelector(), + createAuthorQualityProfileSelector(), + createAuthorMetadataProfileSelector(), selectShowSearchAction(), createExecutingCommandsSelector(), ( - artist, + author, qualityProfile, metadataProfile, showSearchAction, executingCommands ) => { - // If an artist is deleted this selector may fire before the parent - // selectors, which will result in an undefined artist, if that happens + // If an author is deleted this selector may fire before the parent + // selectors, which will result in an undefined author, if that happens // we want to return early here and again in the render function to avoid - // trying to show an artist that has no information available. + // trying to show an author that has no information available. - if (!artist) { + if (!author) { return {}; } - const isRefreshingArtist = executingCommands.some((command) => { + const isRefreshingAuthor = executingCommands.some((command) => { return ( - command.name === commandNames.REFRESH_ARTIST && - command.body.authorId === artist.id + command.name === commandNames.REFRESH_AUTHOR && + command.body.authorId === author.id ); }); - const isSearchingArtist = executingCommands.some((command) => { + const isSearchingAuthor = executingCommands.some((command) => { return ( - command.name === commandNames.ARTIST_SEARCH && - command.body.authorId === artist.id + command.name === commandNames.AUTHOR_SEARCH && + command.body.authorId === author.id ); }); - const latestAlbum = _.maxBy(artist.albums, (album) => album.releaseDate); + const latestBook = _.maxBy(author.books, (book) => book.releaseDate); return { - ...artist, + ...author, qualityProfile, metadataProfile, - latestAlbum, + latestBook, showSearchAction, - isRefreshingArtist, - isSearchingArtist + isRefreshingAuthor, + isSearchingAuthor }; } ); @@ -88,21 +88,21 @@ const mapDispatchToProps = { dispatchExecuteCommand: executeCommand }; -class ArtistIndexItemConnector extends Component { +class AuthorIndexItemConnector extends Component { // // Listeners - onRefreshArtistPress = () => { + onRefreshAuthorPress = () => { this.props.dispatchExecuteCommand({ - name: commandNames.REFRESH_ARTIST, + name: commandNames.REFRESH_AUTHOR, authorId: this.props.id }); } onSearchPress = () => { this.props.dispatchExecuteCommand({ - name: commandNames.ARTIST_SEARCH, + name: commandNames.AUTHOR_SEARCH, authorId: this.props.id }); } @@ -125,17 +125,17 @@ class ArtistIndexItemConnector extends Component { ); } } -ArtistIndexItemConnector.propTypes = { +AuthorIndexItemConnector.propTypes = { id: PropTypes.number, component: PropTypes.elementType.isRequired, dispatchExecuteCommand: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(ArtistIndexItemConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(AuthorIndexItemConnector); diff --git a/frontend/src/Artist/Index/Banners/ArtistIndexBanner.css b/frontend/src/Author/Index/Banners/AuthorIndexBanner.css similarity index 100% rename from frontend/src/Artist/Index/Banners/ArtistIndexBanner.css rename to frontend/src/Author/Index/Banners/AuthorIndexBanner.css diff --git a/frontend/src/Artist/Index/Banners/ArtistIndexBanner.js b/frontend/src/Author/Index/Banners/AuthorIndexBanner.js similarity index 67% rename from frontend/src/Artist/Index/Banners/ArtistIndexBanner.js rename to frontend/src/Author/Index/Banners/AuthorIndexBanner.js index 71ad39fe1..0afeb076d 100644 --- a/frontend/src/Artist/Index/Banners/ArtistIndexBanner.js +++ b/frontend/src/Author/Index/Banners/AuthorIndexBanner.js @@ -6,14 +6,14 @@ import IconButton from 'Components/Link/IconButton'; import SpinnerIconButton from 'Components/Link/SpinnerIconButton'; import Label from 'Components/Label'; import Link from 'Components/Link/Link'; -import ArtistBanner from 'Artist/ArtistBanner'; -import EditArtistModalConnector from 'Artist/Edit/EditArtistModalConnector'; -import DeleteArtistModal from 'Artist/Delete/DeleteArtistModal'; -import ArtistIndexProgressBar from 'Artist/Index/ProgressBar/ArtistIndexProgressBar'; -import ArtistIndexBannerInfo from './ArtistIndexBannerInfo'; -import styles from './ArtistIndexBanner.css'; +import AuthorBanner from 'Author/AuthorBanner'; +import EditAuthorModalConnector from 'Author/Edit/EditAuthorModalConnector'; +import DeleteAuthorModal from 'Author/Delete/DeleteAuthorModal'; +import AuthorIndexProgressBar from 'Author/Index/ProgressBar/AuthorIndexProgressBar'; +import AuthorIndexBannerInfo from './AuthorIndexBannerInfo'; +import styles from './AuthorIndexBanner.css'; -class ArtistIndexBanner extends Component { +class AuthorIndexBanner extends Component { // // Lifecycle @@ -22,31 +22,31 @@ class ArtistIndexBanner extends Component { super(props, context); this.state = { - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: false + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: false }; } // // Listeners - onEditArtistPress = () => { - this.setState({ isEditArtistModalOpen: true }); + onEditAuthorPress = () => { + this.setState({ isEditAuthorModalOpen: true }); } - onEditArtistModalClose = () => { - this.setState({ isEditArtistModalOpen: false }); + onEditAuthorModalClose = () => { + this.setState({ isEditAuthorModalOpen: false }); } - onDeleteArtistPress = () => { + onDeleteAuthorPress = () => { this.setState({ - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: true + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: true }); } - onDeleteArtistModalClose = () => { - this.setState({ isDeleteArtistModalOpen: false }); + onDeleteAuthorModalClose = () => { + this.setState({ isDeleteAuthorModalOpen: false }); } // @@ -55,7 +55,7 @@ class ArtistIndexBanner extends Component { render() { const { id, - artistName, + authorName, monitored, status, titleSlug, @@ -73,24 +73,23 @@ class ArtistIndexBanner extends Component { showRelativeDates, shortDateFormat, timeFormat, - isRefreshingArtist, - isSearchingArtist, - onRefreshArtistPress, + isRefreshingAuthor, + isSearchingAuthor, + onRefreshAuthorPress, onSearchPress, ...otherProps } = this.props; const { - albumCount, + bookCount, sizeOnDisk, - trackCount, - trackFileCount, - totalTrackCount + bookFileCount, + totalBookCount } = statistics; const { - isEditArtistModalOpen, - isDeleteArtistModalOpen + isEditAuthorModalOpen, + isDeleteAuthorModalOpen } = this.state; const link = `/author/${titleSlug}`; @@ -108,9 +107,9 @@ class ArtistIndexBanner extends Component { { @@ -118,8 +117,8 @@ class ArtistIndexBanner extends Component { } @@ -127,8 +126,8 @@ class ArtistIndexBanner extends Component { @@ -145,7 +144,7 @@ class ArtistIndexBanner extends Component { style={elementStyle} to={link} > -
    - @@ -169,7 +168,7 @@ class ArtistIndexBanner extends Component { { showTitle &&
    - {artistName} + {authorName}
    } @@ -203,8 +202,8 @@ class ArtistIndexBanner extends Component {
    } - - -
    @@ -232,9 +231,9 @@ class ArtistIndexBanner extends Component { } } -ArtistIndexBanner.propTypes = { +AuthorIndexBanner.propTypes = { id: PropTypes.number.isRequired, - artistName: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, monitored: PropTypes.bool.isRequired, status: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, @@ -252,19 +251,18 @@ ArtistIndexBanner.propTypes = { showRelativeDates: PropTypes.bool.isRequired, shortDateFormat: PropTypes.string.isRequired, timeFormat: PropTypes.string.isRequired, - isRefreshingArtist: PropTypes.bool.isRequired, - isSearchingArtist: PropTypes.bool.isRequired, - onRefreshArtistPress: PropTypes.func.isRequired, + isRefreshingAuthor: PropTypes.bool.isRequired, + isSearchingAuthor: PropTypes.bool.isRequired, + onRefreshAuthorPress: PropTypes.func.isRequired, onSearchPress: PropTypes.func.isRequired }; -ArtistIndexBanner.defaultProps = { +AuthorIndexBanner.defaultProps = { statistics: { - albumCount: 0, - trackCount: 0, - trackFileCount: 0, - totalTrackCount: 0 + bookCount: 0, + bookFileCount: 0, + totalBookCount: 0 } }; -export default ArtistIndexBanner; +export default AuthorIndexBanner; diff --git a/frontend/src/Artist/Index/Banners/ArtistIndexBannerInfo.css b/frontend/src/Author/Index/Banners/AuthorIndexBannerInfo.css similarity index 100% rename from frontend/src/Artist/Index/Banners/ArtistIndexBannerInfo.css rename to frontend/src/Author/Index/Banners/AuthorIndexBannerInfo.css diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPosterInfo.js b/frontend/src/Author/Index/Banners/AuthorIndexBannerInfo.js similarity index 82% rename from frontend/src/Artist/Index/Posters/ArtistIndexPosterInfo.js rename to frontend/src/Author/Index/Banners/AuthorIndexBannerInfo.js index 591961605..c989a14f1 100644 --- a/frontend/src/Artist/Index/Posters/ArtistIndexPosterInfo.js +++ b/frontend/src/Author/Index/Banners/AuthorIndexBannerInfo.js @@ -2,15 +2,15 @@ import PropTypes from 'prop-types'; import React from 'react'; import getRelativeDate from 'Utilities/Date/getRelativeDate'; import formatBytes from 'Utilities/Number/formatBytes'; -import styles from './ArtistIndexPosterInfo.css'; +import styles from './AuthorIndexBannerInfo.css'; -function ArtistIndexPosterInfo(props) { +function AuthorIndexBannerInfo(props) { const { qualityProfile, showQualityProfile, previousAiring, added, - albumCount, + bookCount, path, sizeOnDisk, sortKey, @@ -63,18 +63,18 @@ function ArtistIndexPosterInfo(props) { ); } - if (sortKey === 'albumCount') { - let albums = '1 album'; + if (sortKey === 'bookCount') { + let books = '1 book'; - if (albumCount === 0) { - albums = 'No albums'; - } else if (albumCount > 1) { - albums = `${albumCount} albums`; + if (bookCount === 0) { + books = 'No books'; + } else if (bookCount > 1) { + books = `${bookCount} books`; } return (
    - {albums} + {books}
    ); } @@ -98,12 +98,12 @@ function ArtistIndexPosterInfo(props) { return null; } -ArtistIndexPosterInfo.propTypes = { +AuthorIndexBannerInfo.propTypes = { qualityProfile: PropTypes.object.isRequired, showQualityProfile: PropTypes.bool.isRequired, previousAiring: PropTypes.string, added: PropTypes.string, - albumCount: PropTypes.number.isRequired, + bookCount: PropTypes.number.isRequired, path: PropTypes.string.isRequired, sizeOnDisk: PropTypes.number, sortKey: PropTypes.string.isRequired, @@ -112,4 +112,4 @@ ArtistIndexPosterInfo.propTypes = { timeFormat: PropTypes.string.isRequired }; -export default ArtistIndexPosterInfo; +export default AuthorIndexBannerInfo; diff --git a/frontend/src/Artist/Index/Banners/ArtistIndexBanners.css b/frontend/src/Author/Index/Banners/AuthorIndexBanners.css similarity index 100% rename from frontend/src/Artist/Index/Banners/ArtistIndexBanners.css rename to frontend/src/Author/Index/Banners/AuthorIndexBanners.css diff --git a/frontend/src/Artist/Index/Banners/ArtistIndexBanners.js b/frontend/src/Author/Index/Banners/AuthorIndexBanners.js similarity index 90% rename from frontend/src/Artist/Index/Banners/ArtistIndexBanners.js rename to frontend/src/Author/Index/Banners/AuthorIndexBanners.js index 2e0f2fad2..99a4e7948 100644 --- a/frontend/src/Artist/Index/Banners/ArtistIndexBanners.js +++ b/frontend/src/Author/Index/Banners/AuthorIndexBanners.js @@ -5,13 +5,13 @@ import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter'; import hasDifferentItemsOrOrder from 'Utilities/Object/hasDifferentItemsOrOrder'; import dimensions from 'Styles/Variables/dimensions'; import Measure from 'Components/Measure'; -import ArtistIndexItemConnector from 'Artist/Index/ArtistIndexItemConnector'; -import ArtistIndexBanner from './ArtistIndexBanner'; -import styles from './ArtistIndexBanners.css'; +import AuthorIndexItemConnector from 'Author/Index/AuthorIndexItemConnector'; +import AuthorIndexBanner from './AuthorIndexBanner'; +import styles from './AuthorIndexBanners.css'; // container dimensions -const columnPadding = parseInt(dimensions.artistIndexColumnPadding); -const columnPaddingSmallScreen = parseInt(dimensions.artistIndexColumnPaddingSmallScreen); +const columnPadding = parseInt(dimensions.authorIndexColumnPadding); +const columnPaddingSmallScreen = parseInt(dimensions.authorIndexColumnPaddingSmallScreen); const progressBarHeight = parseInt(dimensions.progressBarSmallHeight); const detailedProgressBarHeight = parseInt(dimensions.progressBarMediumHeight); @@ -86,7 +86,7 @@ function calculateHeight(bannerWidth) { return Math.ceil((88/476) * bannerWidth); } -class ArtistIndexBanners extends Component { +class AuthorIndexBanners extends Component { // // Lifecycle @@ -204,9 +204,9 @@ class ArtistIndexBanners extends Component { showQualityProfile } = bannerOptions; - const artist = items[rowIndex * columnCount + columnIndex]; + const author = items[rowIndex * columnCount + columnIndex]; - if (!artist) { + if (!author) { return null; } @@ -215,9 +215,9 @@ class ArtistIndexBanners extends Component { style={style} key={key} > -
); @@ -302,7 +302,7 @@ class ArtistIndexBanners extends Component { } } -ArtistIndexBanners.propTypes = { +AuthorIndexBanners.propTypes = { items: PropTypes.arrayOf(PropTypes.object).isRequired, sortKey: PropTypes.string, bannerOptions: PropTypes.object.isRequired, @@ -314,4 +314,4 @@ ArtistIndexBanners.propTypes = { timeFormat: PropTypes.string.isRequired }; -export default ArtistIndexBanners; +export default AuthorIndexBanners; diff --git a/frontend/src/Artist/Index/Banners/ArtistIndexBannersConnector.js b/frontend/src/Author/Index/Banners/AuthorIndexBannersConnector.js similarity index 80% rename from frontend/src/Artist/Index/Banners/ArtistIndexBannersConnector.js rename to frontend/src/Author/Index/Banners/AuthorIndexBannersConnector.js index bac56ebd2..d723071f6 100644 --- a/frontend/src/Artist/Index/Banners/ArtistIndexBannersConnector.js +++ b/frontend/src/Author/Index/Banners/AuthorIndexBannersConnector.js @@ -2,11 +2,11 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; -import ArtistIndexBanners from './ArtistIndexBanners'; +import AuthorIndexBanners from './AuthorIndexBanners'; function createMapStateToProps() { return createSelector( - (state) => state.artistIndex.bannerOptions, + (state) => state.authorIndex.bannerOptions, createUISettingsSelector(), createDimensionsSelector(), (bannerOptions, uiSettings, dimensions) => { @@ -21,4 +21,4 @@ function createMapStateToProps() { ); } -export default connect(createMapStateToProps)(ArtistIndexBanners); +export default connect(createMapStateToProps)(AuthorIndexBanners); diff --git a/frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModal.js b/frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModal.js similarity index 54% rename from frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModal.js rename to frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModal.js index 34c8abfcf..0f0b268cf 100644 --- a/frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModal.js +++ b/frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModal.js @@ -1,15 +1,15 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import ArtistIndexBannerOptionsModalContentConnector from './ArtistIndexBannerOptionsModalContentConnector'; +import AuthorIndexBannerOptionsModalContentConnector from './AuthorIndexBannerOptionsModalContentConnector'; -function ArtistIndexBannerOptionsModal({ isOpen, onModalClose, ...otherProps }) { +function AuthorIndexBannerOptionsModal({ isOpen, onModalClose, ...otherProps }) { return ( - @@ -17,9 +17,9 @@ function ArtistIndexBannerOptionsModal({ isOpen, onModalClose, ...otherProps }) ); } -ArtistIndexBannerOptionsModal.propTypes = { +AuthorIndexBannerOptionsModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default ArtistIndexBannerOptionsModal; +export default AuthorIndexBannerOptionsModal; diff --git a/frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContent.js b/frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContent.js similarity index 96% rename from frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContent.js rename to frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContent.js index 6bfcad0bb..a3b35b892 100644 --- a/frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContent.js +++ b/frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContent.js @@ -18,7 +18,7 @@ const bannerSizeOptions = [ { key: 'large', value: 'Large' } ]; -class ArtistIndexBannerOptionsModalContent extends Component { +class AuthorIndexBannerOptionsModalContent extends Component { // // Lifecycle @@ -144,7 +144,7 @@ class ArtistIndexBannerOptionsModalContent extends Component { type={inputTypes.CHECK} name="showTitle" value={showTitle} - helpText="Show artist name under banner" + helpText="Show author name under banner" onChange={this.onChangeBannerOption} /> @@ -199,7 +199,7 @@ class ArtistIndexBannerOptionsModalContent extends Component { } } -ArtistIndexBannerOptionsModalContent.propTypes = { +AuthorIndexBannerOptionsModalContent.propTypes = { size: PropTypes.string.isRequired, showTitle: PropTypes.bool.isRequired, showQualityProfile: PropTypes.bool.isRequired, @@ -210,4 +210,4 @@ ArtistIndexBannerOptionsModalContent.propTypes = { onModalClose: PropTypes.func.isRequired }; -export default ArtistIndexBannerOptionsModalContent; +export default AuthorIndexBannerOptionsModalContent; diff --git a/frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContentConnector.js b/frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContentConnector.js similarity index 53% rename from frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContentConnector.js rename to frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContentConnector.js index 884edd05d..ec4f1bfce 100644 --- a/frontend/src/Artist/Index/Banners/Options/ArtistIndexBannerOptionsModalContentConnector.js +++ b/frontend/src/Author/Index/Banners/Options/AuthorIndexBannerOptionsModalContentConnector.js @@ -1,13 +1,13 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { setArtistBannerOption } from 'Store/Actions/artistIndexActions'; -import ArtistIndexBannerOptionsModalContent from './ArtistIndexBannerOptionsModalContent'; +import { setAuthorBannerOption } from 'Store/Actions/authorIndexActions'; +import AuthorIndexBannerOptionsModalContent from './AuthorIndexBannerOptionsModalContent'; function createMapStateToProps() { return createSelector( - (state) => state.artistIndex, - (artistIndex) => { - return artistIndex.bannerOptions; + (state) => state.authorIndex, + (authorIndex) => { + return authorIndex.bannerOptions; } ); } @@ -15,9 +15,9 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { onChangeBannerOption(payload) { - dispatch(setArtistBannerOption(payload)); + dispatch(setAuthorBannerOption(payload)); } }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(ArtistIndexBannerOptionsModalContent); +export default connect(createMapStateToProps, createMapDispatchToProps)(AuthorIndexBannerOptionsModalContent); diff --git a/frontend/src/Artist/Index/Menus/ArtistIndexFilterMenu.js b/frontend/src/Author/Index/Menus/AuthorIndexFilterMenu.js similarity index 75% rename from frontend/src/Artist/Index/Menus/ArtistIndexFilterMenu.js rename to frontend/src/Author/Index/Menus/AuthorIndexFilterMenu.js index 818e83311..f2395782d 100644 --- a/frontend/src/Artist/Index/Menus/ArtistIndexFilterMenu.js +++ b/frontend/src/Author/Index/Menus/AuthorIndexFilterMenu.js @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import { align } from 'Helpers/Props'; import FilterMenu from 'Components/Menu/FilterMenu'; -import ArtistIndexFilterModalConnector from 'Artist/Index/ArtistIndexFilterModalConnector'; +import AuthorIndexFilterModalConnector from 'Author/Index/AuthorIndexFilterModalConnector'; -function ArtistIndexFilterMenu(props) { +function AuthorIndexFilterMenu(props) { const { selectedFilterKey, filters, @@ -20,13 +20,13 @@ function ArtistIndexFilterMenu(props) { selectedFilterKey={selectedFilterKey} filters={filters} customFilters={customFilters} - filterModalConnectorComponent={ArtistIndexFilterModalConnector} + filterModalConnectorComponent={AuthorIndexFilterModalConnector} onFilterSelect={onFilterSelect} /> ); } -ArtistIndexFilterMenu.propTypes = { +AuthorIndexFilterMenu.propTypes = { selectedFilterKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, filters: PropTypes.arrayOf(PropTypes.object).isRequired, customFilters: PropTypes.arrayOf(PropTypes.object).isRequired, @@ -34,8 +34,8 @@ ArtistIndexFilterMenu.propTypes = { onFilterSelect: PropTypes.func.isRequired }; -ArtistIndexFilterMenu.defaultProps = { +AuthorIndexFilterMenu.defaultProps = { showCustomFilters: false }; -export default ArtistIndexFilterMenu; +export default AuthorIndexFilterMenu; diff --git a/frontend/src/Artist/Index/Menus/ArtistIndexSortMenu.js b/frontend/src/Author/Index/Menus/AuthorIndexSortMenu.js similarity index 90% rename from frontend/src/Artist/Index/Menus/ArtistIndexSortMenu.js rename to frontend/src/Author/Index/Menus/AuthorIndexSortMenu.js index fc5854648..a0bfd03b1 100644 --- a/frontend/src/Artist/Index/Menus/ArtistIndexSortMenu.js +++ b/frontend/src/Author/Index/Menus/AuthorIndexSortMenu.js @@ -5,7 +5,7 @@ import SortMenu from 'Components/Menu/SortMenu'; import MenuContent from 'Components/Menu/MenuContent'; import SortMenuItem from 'Components/Menu/SortMenuItem'; -function ArtistIndexSortMenu(props) { +function AuthorIndexSortMenu(props) { const { sortKey, sortDirection, @@ -38,7 +38,7 @@ function ArtistIndexSortMenu(props) { - Next Album + Next Book - Last Album + Last Book - Albums + Books - Tracks + Books - Track Count + Book Count { - this.setState({ isEditArtistModalOpen: true }); + onEditAuthorPress = () => { + this.setState({ isEditAuthorModalOpen: true }); } - onEditArtistModalClose = () => { - this.setState({ isEditArtistModalOpen: false }); + onEditAuthorModalClose = () => { + this.setState({ isEditAuthorModalOpen: false }); } - onDeleteArtistPress = () => { + onDeleteAuthorPress = () => { this.setState({ - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: true + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: true }); } - onDeleteArtistModalClose = () => { - this.setState({ isDeleteArtistModalOpen: false }); + onDeleteAuthorModalClose = () => { + this.setState({ isDeleteAuthorModalOpen: false }); } // @@ -71,7 +71,7 @@ class ArtistIndexOverview extends Component { render() { const { id, - artistName, + authorName, overview, monitored, status, @@ -90,24 +90,23 @@ class ArtistIndexOverview extends Component { timeFormat, rowHeight, isSmallScreen, - isRefreshingArtist, - isSearchingArtist, - onRefreshArtistPress, + isRefreshingAuthor, + isSearchingAuthor, + onRefreshAuthorPress, onSearchPress, ...otherProps } = this.props; const { - albumCount, + bookCount, sizeOnDisk, - trackCount, - trackFileCount, - totalTrackCount + bookFileCount, + totalBookCount } = statistics; const { - isEditArtistModalOpen, - isDeleteArtistModalOpen + isEditAuthorModalOpen, + isDeleteAuthorModalOpen } = this.state; const link = `/author/${titleSlug}`; @@ -138,7 +137,7 @@ class ArtistIndexOverview extends Component { style={elementStyle} to={link} > - - @@ -166,15 +165,15 @@ class ArtistIndexOverview extends Component { className={styles.title} to={link} > - {artistName} + {authorName}
{ @@ -182,16 +181,16 @@ class ArtistIndexOverview extends Component { }
@@ -208,11 +207,11 @@ class ArtistIndexOverview extends Component { /> - - - ); } } -ArtistIndexOverview.propTypes = { +AuthorIndexOverview.propTypes = { id: PropTypes.number.isRequired, - artistName: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, overview: PropTypes.string.isRequired, monitored: PropTypes.bool.isRequired, status: PropTypes.string.isRequired, @@ -264,19 +263,18 @@ ArtistIndexOverview.propTypes = { longDateFormat: PropTypes.string.isRequired, timeFormat: PropTypes.string.isRequired, isSmallScreen: PropTypes.bool.isRequired, - isRefreshingArtist: PropTypes.bool.isRequired, - isSearchingArtist: PropTypes.bool.isRequired, - onRefreshArtistPress: PropTypes.func.isRequired, + isRefreshingAuthor: PropTypes.bool.isRequired, + isSearchingAuthor: PropTypes.bool.isRequired, + onRefreshAuthorPress: PropTypes.func.isRequired, onSearchPress: PropTypes.func.isRequired }; -ArtistIndexOverview.defaultProps = { +AuthorIndexOverview.defaultProps = { statistics: { - albumCount: 0, - trackCount: 0, - trackFileCount: 0, - totalTrackCount: 0 + bookCount: 0, + bookFileCount: 0, + totalBookCount: 0 } }; -export default ArtistIndexOverview; +export default AuthorIndexOverview; diff --git a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfo.css b/frontend/src/Author/Index/Overview/AuthorIndexOverviewInfo.css similarity index 100% rename from frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfo.css rename to frontend/src/Author/Index/Overview/AuthorIndexOverviewInfo.css diff --git a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfo.js b/frontend/src/Author/Index/Overview/AuthorIndexOverviewInfo.js similarity index 80% rename from frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfo.js rename to frontend/src/Author/Index/Overview/AuthorIndexOverviewInfo.js index f7839cab5..c63f11403 100644 --- a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfo.js +++ b/frontend/src/Author/Index/Overview/AuthorIndexOverviewInfo.js @@ -5,10 +5,10 @@ import getRelativeDate from 'Utilities/Date/getRelativeDate'; import formatBytes from 'Utilities/Number/formatBytes'; import { icons } from 'Helpers/Props'; import dimensions from 'Styles/Variables/dimensions'; -import ArtistIndexOverviewInfoRow from './ArtistIndexOverviewInfoRow'; -import styles from './ArtistIndexOverviewInfo.css'; +import AuthorIndexOverviewInfoRow from './AuthorIndexOverviewInfoRow'; +import styles from './AuthorIndexOverviewInfo.css'; -const infoRowHeight = parseInt(dimensions.artistIndexOverviewInfoRowHeight); +const infoRowHeight = parseInt(dimensions.authorIndexOverviewInfoRowHeight); const rows = [ { @@ -23,9 +23,9 @@ const rows = [ valueProp: 'qualityProfileId' }, { - name: 'lastAlbum', - showProp: 'showLastAlbum', - valueProp: 'lastAlbum' + name: 'lastBook', + showProp: 'showLastBook', + valueProp: 'lastBook' }, { name: 'added', @@ -33,9 +33,9 @@ const rows = [ valueProp: 'added' }, { - name: 'albumCount', - showProp: 'showAlbumCount', - valueProp: 'albumCount' + name: 'bookCount', + showProp: 'showBookCount', + valueProp: 'bookCount' }, { name: 'path', @@ -84,19 +84,19 @@ function getInfoRowProps(row, props) { }; } - if (name === 'lastAlbum') { + if (name === 'lastBook') { const { - lastAlbum, + lastBook, showRelativeDates, shortDateFormat, timeFormat } = props; return { - title: `Last Album: ${lastAlbum.title}`, + title: `Last Book: ${lastBook.title}`, iconName: icons.CALENDAR, label: getRelativeDate( - lastAlbum.releaseDate, + lastBook.releaseDate, shortDateFormat, showRelativeDates, { @@ -131,20 +131,20 @@ function getInfoRowProps(row, props) { }; } - if (name === 'albumCount') { - const { albumCount } = props; - let albums = '1 album'; + if (name === 'bookCount') { + const { bookCount } = props; + let books = '1 book'; - if (albumCount === 0) { - albums = 'No albums'; - } else if (albumCount > 1) { - albums = `${albumCount} albums`; + if (bookCount === 0) { + books = 'No books'; + } else if (bookCount > 1) { + books = `${bookCount} books`; } return { - title: 'Album Count', - iconName: icons.CIRCLE, - label: albums + title: 'Book Count', + iconName: icons.BOOK, + label: books }; } @@ -165,7 +165,7 @@ function getInfoRowProps(row, props) { } } -function ArtistIndexOverviewInfo(props) { +function AuthorIndexOverviewInfo(props) { const { height, nextAiring, @@ -183,7 +183,7 @@ function ArtistIndexOverviewInfo(props) {
{ !!nextAiring && - @@ -224,20 +224,20 @@ function ArtistIndexOverviewInfo(props) { ); } -ArtistIndexOverviewInfo.propTypes = { +AuthorIndexOverviewInfo.propTypes = { height: PropTypes.number.isRequired, showMonitored: PropTypes.bool.isRequired, showQualityProfile: PropTypes.bool.isRequired, showAdded: PropTypes.bool.isRequired, - showAlbumCount: PropTypes.bool.isRequired, + showBookCount: PropTypes.bool.isRequired, showPath: PropTypes.bool.isRequired, showSizeOnDisk: PropTypes.bool.isRequired, monitored: PropTypes.bool.isRequired, nextAiring: PropTypes.string, qualityProfile: PropTypes.object.isRequired, - lastAlbum: PropTypes.object, + lastBook: PropTypes.object, added: PropTypes.string, - albumCount: PropTypes.number.isRequired, + bookCount: PropTypes.number.isRequired, path: PropTypes.string.isRequired, sizeOnDisk: PropTypes.number, sortKey: PropTypes.string.isRequired, @@ -247,4 +247,4 @@ ArtistIndexOverviewInfo.propTypes = { timeFormat: PropTypes.string.isRequired }; -export default ArtistIndexOverviewInfo; +export default AuthorIndexOverviewInfo; diff --git a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfoRow.css b/frontend/src/Author/Index/Overview/AuthorIndexOverviewInfoRow.css similarity index 70% rename from frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfoRow.css rename to frontend/src/Author/Index/Overview/AuthorIndexOverviewInfoRow.css index 1fcd432a3..a2d94a632 100644 --- a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfoRow.css +++ b/frontend/src/Author/Index/Overview/AuthorIndexOverviewInfoRow.css @@ -1,5 +1,5 @@ .infoRow { - flex: 0 0 $artistIndexOverviewInfoRowHeight; + flex: 0 0 $authorIndexOverviewInfoRowHeight; margin: 2px 0; } diff --git a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfoRow.js b/frontend/src/Author/Index/Overview/AuthorIndexOverviewInfoRow.js similarity index 72% rename from frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfoRow.js rename to frontend/src/Author/Index/Overview/AuthorIndexOverviewInfoRow.js index b04029b88..f5ae86ca7 100644 --- a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewInfoRow.js +++ b/frontend/src/Author/Index/Overview/AuthorIndexOverviewInfoRow.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import Icon from 'Components/Icon'; -import styles from './ArtistIndexOverviewInfoRow.css'; +import styles from './AuthorIndexOverviewInfoRow.css'; -function ArtistIndexOverviewInfoRow(props) { +function AuthorIndexOverviewInfoRow(props) { const { title, iconName, @@ -26,10 +26,10 @@ function ArtistIndexOverviewInfoRow(props) { ); } -ArtistIndexOverviewInfoRow.propTypes = { +AuthorIndexOverviewInfoRow.propTypes = { title: PropTypes.string, iconName: PropTypes.object.isRequired, label: PropTypes.string.isRequired }; -export default ArtistIndexOverviewInfoRow; +export default AuthorIndexOverviewInfoRow; diff --git a/frontend/src/Artist/Index/Overview/ArtistIndexOverviews.css b/frontend/src/Author/Index/Overview/AuthorIndexOverviews.css similarity index 100% rename from frontend/src/Artist/Index/Overview/ArtistIndexOverviews.css rename to frontend/src/Author/Index/Overview/AuthorIndexOverviews.css diff --git a/frontend/src/Artist/Index/Overview/ArtistIndexOverviews.js b/frontend/src/Author/Index/Overview/AuthorIndexOverviews.js similarity index 89% rename from frontend/src/Artist/Index/Overview/ArtistIndexOverviews.js rename to frontend/src/Author/Index/Overview/AuthorIndexOverviews.js index 2260f272f..e3d2afea3 100644 --- a/frontend/src/Artist/Index/Overview/ArtistIndexOverviews.js +++ b/frontend/src/Author/Index/Overview/AuthorIndexOverviews.js @@ -5,13 +5,13 @@ import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter'; import hasDifferentItemsOrOrder from 'Utilities/Object/hasDifferentItemsOrOrder'; import dimensions from 'Styles/Variables/dimensions'; import Measure from 'Components/Measure'; -import ArtistIndexItemConnector from 'Artist/Index/ArtistIndexItemConnector'; -import ArtistIndexOverview from './ArtistIndexOverview'; -import styles from './ArtistIndexOverviews.css'; +import AuthorIndexItemConnector from 'Author/Index/AuthorIndexItemConnector'; +import AuthorIndexOverview from './AuthorIndexOverview'; +import styles from './AuthorIndexOverviews.css'; // Poster container dimensions -const columnPadding = parseInt(dimensions.artistIndexColumnPadding); -const columnPaddingSmallScreen = parseInt(dimensions.artistIndexColumnPaddingSmallScreen); +const columnPadding = parseInt(dimensions.authorIndexColumnPadding); +const columnPaddingSmallScreen = parseInt(dimensions.authorIndexColumnPaddingSmallScreen); const progressBarHeight = parseInt(dimensions.progressBarSmallHeight); const detailedProgressBarHeight = parseInt(dimensions.progressBarMediumHeight); @@ -47,7 +47,7 @@ function calculatePosterHeight(posterWidth) { return posterWidth; } -class ArtistIndexOverviews extends Component { +class AuthorIndexOverviews extends Component { // // Lifecycle @@ -148,9 +148,9 @@ class ArtistIndexOverviews extends Component { rowHeight } = this.state; - const artist = items[rowIndex]; + const author = items[rowIndex]; - if (!artist) { + if (!author) { return null; } @@ -159,9 +159,9 @@ class ArtistIndexOverviews extends Component { key={key} style={style} > -
); @@ -245,7 +245,7 @@ class ArtistIndexOverviews extends Component { } } -ArtistIndexOverviews.propTypes = { +AuthorIndexOverviews.propTypes = { items: PropTypes.arrayOf(PropTypes.object).isRequired, sortKey: PropTypes.string, overviewOptions: PropTypes.object.isRequired, @@ -259,4 +259,4 @@ ArtistIndexOverviews.propTypes = { timeFormat: PropTypes.string.isRequired }; -export default ArtistIndexOverviews; +export default AuthorIndexOverviews; diff --git a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewsConnector.js b/frontend/src/Author/Index/Overview/AuthorIndexOverviewsConnector.js similarity index 81% rename from frontend/src/Artist/Index/Overview/ArtistIndexOverviewsConnector.js rename to frontend/src/Author/Index/Overview/AuthorIndexOverviewsConnector.js index 595a471b1..7f8d3461d 100644 --- a/frontend/src/Artist/Index/Overview/ArtistIndexOverviewsConnector.js +++ b/frontend/src/Author/Index/Overview/AuthorIndexOverviewsConnector.js @@ -2,11 +2,11 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; -import ArtistIndexOverviews from './ArtistIndexOverviews'; +import AuthorIndexOverviews from './AuthorIndexOverviews'; function createMapStateToProps() { return createSelector( - (state) => state.artistIndex.overviewOptions, + (state) => state.authorIndex.overviewOptions, createUISettingsSelector(), createDimensionsSelector(), (overviewOptions, uiSettings, dimensions) => { @@ -22,4 +22,4 @@ function createMapStateToProps() { ); } -export default connect(createMapStateToProps)(ArtistIndexOverviews); +export default connect(createMapStateToProps)(AuthorIndexOverviews); diff --git a/frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModal.js b/frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModal.js similarity index 54% rename from frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModal.js rename to frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModal.js index 9ca575185..e26de7641 100644 --- a/frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModal.js +++ b/frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModal.js @@ -1,15 +1,15 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import ArtistIndexOverviewOptionsModalContentConnector from './ArtistIndexOverviewOptionsModalContentConnector'; +import AuthorIndexOverviewOptionsModalContentConnector from './AuthorIndexOverviewOptionsModalContentConnector'; -function ArtistIndexOverviewOptionsModal({ isOpen, onModalClose, ...otherProps }) { +function AuthorIndexOverviewOptionsModal({ isOpen, onModalClose, ...otherProps }) { return ( - @@ -17,9 +17,9 @@ function ArtistIndexOverviewOptionsModal({ isOpen, onModalClose, ...otherProps } ); } -ArtistIndexOverviewOptionsModal.propTypes = { +AuthorIndexOverviewOptionsModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default ArtistIndexOverviewOptionsModal; +export default AuthorIndexOverviewOptionsModal; diff --git a/frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContent.js b/frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContent.js similarity index 88% rename from frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContent.js rename to frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContent.js index 2fe569965..c59b4c6b7 100644 --- a/frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContent.js +++ b/frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContent.js @@ -18,7 +18,7 @@ const posterSizeOptions = [ { key: 'large', value: 'Large' } ]; -class ArtistIndexOverviewOptionsModalContent extends Component { +class AuthorIndexOverviewOptionsModalContent extends Component { // // Lifecycle @@ -31,9 +31,9 @@ class ArtistIndexOverviewOptionsModalContent extends Component { size: props.size, showMonitored: props.showMonitored, showQualityProfile: props.showQualityProfile, - showLastAlbum: props.showLastAlbum, + showLastBook: props.showLastBook, showAdded: props.showAdded, - showAlbumCount: props.showAlbumCount, + showBookCount: props.showBookCount, showPath: props.showPath, showSizeOnDisk: props.showSizeOnDisk, showSearchAction: props.showSearchAction @@ -46,9 +46,9 @@ class ArtistIndexOverviewOptionsModalContent extends Component { size, showMonitored, showQualityProfile, - showLastAlbum, + showLastBook, showAdded, - showAlbumCount, + showBookCount, showPath, showSizeOnDisk, showSearchAction @@ -72,16 +72,16 @@ class ArtistIndexOverviewOptionsModalContent extends Component { state.showQualityProfile = showQualityProfile; } - if (showLastAlbum !== prevProps.showLastAlbum) { - state.showLastAlbum = showLastAlbum; + if (showLastBook !== prevProps.showLastBook) { + state.showLastBook = showLastBook; } if (showAdded !== prevProps.showAdded) { state.showAdded = showAdded; } - if (showAlbumCount !== prevProps.showAlbumCount) { - state.showAlbumCount = showAlbumCount; + if (showBookCount !== prevProps.showBookCount) { + state.showBookCount = showBookCount; } if (showPath !== prevProps.showPath) { @@ -125,9 +125,9 @@ class ArtistIndexOverviewOptionsModalContent extends Component { size, showMonitored, showQualityProfile, - showLastAlbum, + showLastBook, showAdded, - showAlbumCount, + showBookCount, showPath, showSizeOnDisk, showSearchAction @@ -189,12 +189,12 @@ class ArtistIndexOverviewOptionsModalContent extends Component { - Show Last Album + Show Last Book @@ -211,12 +211,12 @@ class ArtistIndexOverviewOptionsModalContent extends Component { - Show Album Count + Show Book Count @@ -269,14 +269,14 @@ class ArtistIndexOverviewOptionsModalContent extends Component { } } -ArtistIndexOverviewOptionsModalContent.propTypes = { +AuthorIndexOverviewOptionsModalContent.propTypes = { size: PropTypes.string.isRequired, detailedProgressBar: PropTypes.bool.isRequired, showMonitored: PropTypes.bool.isRequired, showQualityProfile: PropTypes.bool.isRequired, - showLastAlbum: PropTypes.bool.isRequired, + showLastBook: PropTypes.bool.isRequired, showAdded: PropTypes.bool.isRequired, - showAlbumCount: PropTypes.bool.isRequired, + showBookCount: PropTypes.bool.isRequired, showPath: PropTypes.bool.isRequired, showSizeOnDisk: PropTypes.bool.isRequired, showSearchAction: PropTypes.bool.isRequired, @@ -284,4 +284,4 @@ ArtistIndexOverviewOptionsModalContent.propTypes = { onModalClose: PropTypes.func.isRequired }; -export default ArtistIndexOverviewOptionsModalContent; +export default AuthorIndexOverviewOptionsModalContent; diff --git a/frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContentConnector.js b/frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContentConnector.js similarity index 53% rename from frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContentConnector.js rename to frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContentConnector.js index 70c30dba6..ba4037b80 100644 --- a/frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContentConnector.js +++ b/frontend/src/Author/Index/Overview/Options/AuthorIndexOverviewOptionsModalContentConnector.js @@ -1,13 +1,13 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { setArtistOverviewOption } from 'Store/Actions/artistIndexActions'; -import ArtistIndexOverviewOptionsModalContent from './ArtistIndexOverviewOptionsModalContent'; +import { setAuthorOverviewOption } from 'Store/Actions/authorIndexActions'; +import AuthorIndexOverviewOptionsModalContent from './AuthorIndexOverviewOptionsModalContent'; function createMapStateToProps() { return createSelector( - (state) => state.artistIndex, - (artistIndex) => { - return artistIndex.overviewOptions; + (state) => state.authorIndex, + (authorIndex) => { + return authorIndex.overviewOptions; } ); } @@ -15,9 +15,9 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { onChangeOverviewOption(payload) { - dispatch(setArtistOverviewOption(payload)); + dispatch(setAuthorOverviewOption(payload)); } }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(ArtistIndexOverviewOptionsModalContent); +export default connect(createMapStateToProps, createMapDispatchToProps)(AuthorIndexOverviewOptionsModalContent); diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPoster.css b/frontend/src/Author/Index/Posters/AuthorIndexPoster.css similarity index 100% rename from frontend/src/Artist/Index/Posters/ArtistIndexPoster.css rename to frontend/src/Author/Index/Posters/AuthorIndexPoster.css diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPoster.js b/frontend/src/Author/Index/Posters/AuthorIndexPoster.js similarity index 68% rename from frontend/src/Artist/Index/Posters/ArtistIndexPoster.js rename to frontend/src/Author/Index/Posters/AuthorIndexPoster.js index 5c749b33b..c97bc3240 100644 --- a/frontend/src/Artist/Index/Posters/ArtistIndexPoster.js +++ b/frontend/src/Author/Index/Posters/AuthorIndexPoster.js @@ -6,14 +6,14 @@ import IconButton from 'Components/Link/IconButton'; import SpinnerIconButton from 'Components/Link/SpinnerIconButton'; import Label from 'Components/Label'; import Link from 'Components/Link/Link'; -import ArtistPoster from 'Artist/ArtistPoster'; -import EditArtistModalConnector from 'Artist/Edit/EditArtistModalConnector'; -import DeleteArtistModal from 'Artist/Delete/DeleteArtistModal'; -import ArtistIndexProgressBar from 'Artist/Index/ProgressBar/ArtistIndexProgressBar'; -import ArtistIndexPosterInfo from './ArtistIndexPosterInfo'; -import styles from './ArtistIndexPoster.css'; +import AuthorPoster from 'Author/AuthorPoster'; +import EditAuthorModalConnector from 'Author/Edit/EditAuthorModalConnector'; +import DeleteAuthorModal from 'Author/Delete/DeleteAuthorModal'; +import AuthorIndexProgressBar from 'Author/Index/ProgressBar/AuthorIndexProgressBar'; +import AuthorIndexPosterInfo from './AuthorIndexPosterInfo'; +import styles from './AuthorIndexPoster.css'; -class ArtistIndexPoster extends Component { +class AuthorIndexPoster extends Component { // // Lifecycle @@ -23,31 +23,31 @@ class ArtistIndexPoster extends Component { this.state = { hasPosterError: false, - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: false + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: false }; } // // Listeners - onEditArtistPress = () => { - this.setState({ isEditArtistModalOpen: true }); + onEditAuthorPress = () => { + this.setState({ isEditAuthorModalOpen: true }); } - onEditArtistModalClose = () => { - this.setState({ isEditArtistModalOpen: false }); + onEditAuthorModalClose = () => { + this.setState({ isEditAuthorModalOpen: false }); } - onDeleteArtistPress = () => { + onDeleteAuthorPress = () => { this.setState({ - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: true + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: true }); } - onDeleteArtistModalClose = () => { - this.setState({ isDeleteArtistModalOpen: false }); + onDeleteAuthorModalClose = () => { + this.setState({ isDeleteAuthorModalOpen: false }); } onPosterLoad = () => { @@ -68,7 +68,7 @@ class ArtistIndexPoster extends Component { render() { const { id, - artistName, + authorName, monitored, titleSlug, status, @@ -86,25 +86,24 @@ class ArtistIndexPoster extends Component { showRelativeDates, shortDateFormat, timeFormat, - isRefreshingArtist, - isSearchingArtist, - onRefreshArtistPress, + isRefreshingAuthor, + isSearchingAuthor, + onRefreshAuthorPress, onSearchPress, ...otherProps } = this.props; const { - albumCount, + bookCount, sizeOnDisk, - trackCount, - trackFileCount, - totalTrackCount + bookFileCount, + totalBookCount } = statistics; const { hasPosterError, - isEditArtistModalOpen, - isDeleteArtistModalOpen + isEditAuthorModalOpen, + isDeleteAuthorModalOpen } = this.state; const link = `/author/${titleSlug}`; @@ -113,7 +112,7 @@ class ArtistIndexPoster extends Component { width: `${posterWidth}px`, height: `${posterHeight}px` }; - elementStyle['object-fit'] = 'contain'; + elementStyle.objectFit = 'contain'; return (
@@ -123,9 +122,9 @@ class ArtistIndexPoster extends Component { { @@ -133,8 +132,8 @@ class ArtistIndexPoster extends Component { } @@ -142,8 +141,8 @@ class ArtistIndexPoster extends Component { @@ -160,7 +159,7 @@ class ArtistIndexPoster extends Component { style={elementStyle} to={link} > - - {artistName} + {authorName}
} - @@ -194,7 +193,7 @@ class ArtistIndexPoster extends Component { { showTitle &&
- {artistName} + {authorName}
} @@ -227,8 +226,8 @@ class ArtistIndexPoster extends Component { } } - - - @@ -256,9 +255,9 @@ class ArtistIndexPoster extends Component { } } -ArtistIndexPoster.propTypes = { +AuthorIndexPoster.propTypes = { id: PropTypes.number.isRequired, - artistName: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, monitored: PropTypes.bool.isRequired, status: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, @@ -276,19 +275,18 @@ ArtistIndexPoster.propTypes = { showRelativeDates: PropTypes.bool.isRequired, shortDateFormat: PropTypes.string.isRequired, timeFormat: PropTypes.string.isRequired, - isRefreshingArtist: PropTypes.bool.isRequired, - isSearchingArtist: PropTypes.bool.isRequired, - onRefreshArtistPress: PropTypes.func.isRequired, + isRefreshingAuthor: PropTypes.bool.isRequired, + isSearchingAuthor: PropTypes.bool.isRequired, + onRefreshAuthorPress: PropTypes.func.isRequired, onSearchPress: PropTypes.func.isRequired }; -ArtistIndexPoster.defaultProps = { +AuthorIndexPoster.defaultProps = { statistics: { - albumCount: 0, - trackCount: 0, - trackFileCount: 0, - totalTrackCount: 0 + bookCount: 0, + bookFileCount: 0, + totalBookCount: 0 } }; -export default ArtistIndexPoster; +export default AuthorIndexPoster; diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPosterInfo.css b/frontend/src/Author/Index/Posters/AuthorIndexPosterInfo.css similarity index 100% rename from frontend/src/Artist/Index/Posters/ArtistIndexPosterInfo.css rename to frontend/src/Author/Index/Posters/AuthorIndexPosterInfo.css diff --git a/frontend/src/Artist/Index/Banners/ArtistIndexBannerInfo.js b/frontend/src/Author/Index/Posters/AuthorIndexPosterInfo.js similarity index 82% rename from frontend/src/Artist/Index/Banners/ArtistIndexBannerInfo.js rename to frontend/src/Author/Index/Posters/AuthorIndexPosterInfo.js index f641de0e1..d1d378321 100644 --- a/frontend/src/Artist/Index/Banners/ArtistIndexBannerInfo.js +++ b/frontend/src/Author/Index/Posters/AuthorIndexPosterInfo.js @@ -2,15 +2,15 @@ import PropTypes from 'prop-types'; import React from 'react'; import getRelativeDate from 'Utilities/Date/getRelativeDate'; import formatBytes from 'Utilities/Number/formatBytes'; -import styles from './ArtistIndexBannerInfo.css'; +import styles from './AuthorIndexPosterInfo.css'; -function ArtistIndexBannerInfo(props) { +function AuthorIndexPosterInfo(props) { const { qualityProfile, showQualityProfile, previousAiring, added, - albumCount, + bookCount, path, sizeOnDisk, sortKey, @@ -63,18 +63,18 @@ function ArtistIndexBannerInfo(props) { ); } - if (sortKey === 'albumCount') { - let albums = '1 album'; + if (sortKey === 'bookCount') { + let books = '1 book'; - if (albumCount === 0) { - albums = 'No albums'; - } else if (albumCount > 1) { - albums = `${albumCount} albums`; + if (bookCount === 0) { + books = 'No books'; + } else if (bookCount > 1) { + books = `${bookCount} books`; } return (
- {albums} + {books}
); } @@ -98,12 +98,12 @@ function ArtistIndexBannerInfo(props) { return null; } -ArtistIndexBannerInfo.propTypes = { +AuthorIndexPosterInfo.propTypes = { qualityProfile: PropTypes.object.isRequired, showQualityProfile: PropTypes.bool.isRequired, previousAiring: PropTypes.string, added: PropTypes.string, - albumCount: PropTypes.number.isRequired, + bookCount: PropTypes.number.isRequired, path: PropTypes.string.isRequired, sizeOnDisk: PropTypes.number, sortKey: PropTypes.string.isRequired, @@ -112,4 +112,4 @@ ArtistIndexBannerInfo.propTypes = { timeFormat: PropTypes.string.isRequired }; -export default ArtistIndexBannerInfo; +export default AuthorIndexPosterInfo; diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPosters.css b/frontend/src/Author/Index/Posters/AuthorIndexPosters.css similarity index 100% rename from frontend/src/Artist/Index/Posters/ArtistIndexPosters.css rename to frontend/src/Author/Index/Posters/AuthorIndexPosters.css diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPosters.js b/frontend/src/Author/Index/Posters/AuthorIndexPosters.js similarity index 91% rename from frontend/src/Artist/Index/Posters/ArtistIndexPosters.js rename to frontend/src/Author/Index/Posters/AuthorIndexPosters.js index bb9a45e5d..bc2da1919 100644 --- a/frontend/src/Artist/Index/Posters/ArtistIndexPosters.js +++ b/frontend/src/Author/Index/Posters/AuthorIndexPosters.js @@ -5,13 +5,13 @@ import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter'; import hasDifferentItemsOrOrder from 'Utilities/Object/hasDifferentItemsOrOrder'; import dimensions from 'Styles/Variables/dimensions'; import Measure from 'Components/Measure'; -import ArtistIndexItemConnector from 'Artist/Index/ArtistIndexItemConnector'; -import ArtistIndexPoster from './ArtistIndexPoster'; -import styles from './ArtistIndexPosters.css'; +import AuthorIndexItemConnector from 'Author/Index/AuthorIndexItemConnector'; +import AuthorIndexPoster from './AuthorIndexPoster'; +import styles from './AuthorIndexPosters.css'; // Poster container dimensions -const columnPadding = parseInt(dimensions.artistIndexColumnPadding); -const columnPaddingSmallScreen = parseInt(dimensions.artistIndexColumnPaddingSmallScreen); +const columnPadding = parseInt(dimensions.authorIndexColumnPadding); +const columnPaddingSmallScreen = parseInt(dimensions.authorIndexColumnPaddingSmallScreen); const progressBarHeight = parseInt(dimensions.progressBarSmallHeight); const detailedProgressBarHeight = parseInt(dimensions.progressBarMediumHeight); @@ -86,7 +86,7 @@ function calculatePosterHeight(posterWidth) { return Math.ceil(posterWidth); } -class ArtistIndexPosters extends Component { +class AuthorIndexPosters extends Component { // // Lifecycle @@ -205,9 +205,9 @@ class ArtistIndexPosters extends Component { } = posterOptions; const authorIdx = rowIndex * columnCount + columnIndex; - const artist = items[authorIdx]; + const author = items[authorIdx]; - if (!artist) { + if (!author) { return null; } @@ -216,9 +216,9 @@ class ArtistIndexPosters extends Component { key={key} style={style} > - ); @@ -305,7 +305,7 @@ class ArtistIndexPosters extends Component { } } -ArtistIndexPosters.propTypes = { +AuthorIndexPosters.propTypes = { items: PropTypes.arrayOf(PropTypes.object).isRequired, sortKey: PropTypes.string, posterOptions: PropTypes.object.isRequired, @@ -317,4 +317,4 @@ ArtistIndexPosters.propTypes = { timeFormat: PropTypes.string.isRequired }; -export default ArtistIndexPosters; +export default AuthorIndexPosters; diff --git a/frontend/src/Artist/Index/Posters/ArtistIndexPostersConnector.js b/frontend/src/Author/Index/Posters/AuthorIndexPostersConnector.js similarity index 80% rename from frontend/src/Artist/Index/Posters/ArtistIndexPostersConnector.js rename to frontend/src/Author/Index/Posters/AuthorIndexPostersConnector.js index 04c187e4e..3287ffda9 100644 --- a/frontend/src/Artist/Index/Posters/ArtistIndexPostersConnector.js +++ b/frontend/src/Author/Index/Posters/AuthorIndexPostersConnector.js @@ -2,11 +2,11 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; -import ArtistIndexPosters from './ArtistIndexPosters'; +import AuthorIndexPosters from './AuthorIndexPosters'; function createMapStateToProps() { return createSelector( - (state) => state.artistIndex.posterOptions, + (state) => state.authorIndex.posterOptions, createUISettingsSelector(), createDimensionsSelector(), (posterOptions, uiSettings, dimensions) => { @@ -21,4 +21,4 @@ function createMapStateToProps() { ); } -export default connect(createMapStateToProps)(ArtistIndexPosters); +export default connect(createMapStateToProps)(AuthorIndexPosters); diff --git a/frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModal.js b/frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModal.js similarity index 54% rename from frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModal.js rename to frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModal.js index e1b0a257a..2f2503b25 100644 --- a/frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModal.js +++ b/frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModal.js @@ -1,15 +1,15 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import ArtistIndexPosterOptionsModalContentConnector from './ArtistIndexPosterOptionsModalContentConnector'; +import AuthorIndexPosterOptionsModalContentConnector from './AuthorIndexPosterOptionsModalContentConnector'; -function ArtistIndexPosterOptionsModal({ isOpen, onModalClose, ...otherProps }) { +function AuthorIndexPosterOptionsModal({ isOpen, onModalClose, ...otherProps }) { return ( - @@ -17,9 +17,9 @@ function ArtistIndexPosterOptionsModal({ isOpen, onModalClose, ...otherProps }) ); } -ArtistIndexPosterOptionsModal.propTypes = { +AuthorIndexPosterOptionsModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default ArtistIndexPosterOptionsModal; +export default AuthorIndexPosterOptionsModal; diff --git a/frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContent.js b/frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContent.js similarity index 96% rename from frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContent.js rename to frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContent.js index 6918436a6..cfb91927d 100644 --- a/frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContent.js +++ b/frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContent.js @@ -18,7 +18,7 @@ const posterSizeOptions = [ { key: 'large', value: 'Large' } ]; -class ArtistIndexPosterOptionsModalContent extends Component { +class AuthorIndexPosterOptionsModalContent extends Component { // // Lifecycle @@ -144,7 +144,7 @@ class ArtistIndexPosterOptionsModalContent extends Component { type={inputTypes.CHECK} name="showTitle" value={showTitle} - helpText="Show artist name under poster" + helpText="Show author name under poster" onChange={this.onChangePosterOption} /> @@ -199,7 +199,7 @@ class ArtistIndexPosterOptionsModalContent extends Component { } } -ArtistIndexPosterOptionsModalContent.propTypes = { +AuthorIndexPosterOptionsModalContent.propTypes = { size: PropTypes.string.isRequired, showTitle: PropTypes.bool.isRequired, showMonitored: PropTypes.bool.isRequired, @@ -210,4 +210,4 @@ ArtistIndexPosterOptionsModalContent.propTypes = { onModalClose: PropTypes.func.isRequired }; -export default ArtistIndexPosterOptionsModalContent; +export default AuthorIndexPosterOptionsModalContent; diff --git a/frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContentConnector.js b/frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContentConnector.js similarity index 53% rename from frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContentConnector.js rename to frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContentConnector.js index 72af268ad..c2b58b93f 100644 --- a/frontend/src/Artist/Index/Posters/Options/ArtistIndexPosterOptionsModalContentConnector.js +++ b/frontend/src/Author/Index/Posters/Options/AuthorIndexPosterOptionsModalContentConnector.js @@ -1,13 +1,13 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { setArtistPosterOption } from 'Store/Actions/artistIndexActions'; -import ArtistIndexPosterOptionsModalContent from './ArtistIndexPosterOptionsModalContent'; +import { setAuthorPosterOption } from 'Store/Actions/authorIndexActions'; +import AuthorIndexPosterOptionsModalContent from './AuthorIndexPosterOptionsModalContent'; function createMapStateToProps() { return createSelector( - (state) => state.artistIndex, - (artistIndex) => { - return artistIndex.posterOptions; + (state) => state.authorIndex, + (authorIndex) => { + return authorIndex.posterOptions; } ); } @@ -15,9 +15,9 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { onChangePosterOption(payload) { - dispatch(setArtistPosterOption(payload)); + dispatch(setAuthorPosterOption(payload)); } }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(ArtistIndexPosterOptionsModalContent); +export default connect(createMapStateToProps, createMapDispatchToProps)(AuthorIndexPosterOptionsModalContent); diff --git a/frontend/src/Artist/Index/ProgressBar/ArtistIndexProgressBar.css b/frontend/src/Author/Index/ProgressBar/AuthorIndexProgressBar.css similarity index 100% rename from frontend/src/Artist/Index/ProgressBar/ArtistIndexProgressBar.css rename to frontend/src/Author/Index/ProgressBar/AuthorIndexProgressBar.css diff --git a/frontend/src/Artist/Index/ProgressBar/ArtistIndexProgressBar.js b/frontend/src/Author/Index/ProgressBar/AuthorIndexProgressBar.js similarity index 55% rename from frontend/src/Artist/Index/ProgressBar/ArtistIndexProgressBar.js rename to frontend/src/Author/Index/ProgressBar/AuthorIndexProgressBar.js index 6be32a46d..941e9a277 100644 --- a/frontend/src/Artist/Index/ProgressBar/ArtistIndexProgressBar.js +++ b/frontend/src/Author/Index/ProgressBar/AuthorIndexProgressBar.js @@ -1,23 +1,23 @@ import PropTypes from 'prop-types'; import React from 'react'; -import getProgressBarKind from 'Utilities/Artist/getProgressBarKind'; +import getProgressBarKind from 'Utilities/Author/getProgressBarKind'; import { sizes } from 'Helpers/Props'; import ProgressBar from 'Components/ProgressBar'; -import styles from './ArtistIndexProgressBar.css'; +import styles from './AuthorIndexProgressBar.css'; -function ArtistIndexProgressBar(props) { +function AuthorIndexProgressBar(props) { const { monitored, status, - trackCount, - trackFileCount, - totalTrackCount, + bookCount, + bookFileCount, + totalBookCount, posterWidth, detailedProgressBar } = props; - const progress = trackCount ? trackFileCount / trackCount * 100 : 100; - const text = `${trackFileCount} / ${trackCount}`; + const progress = bookCount ? bookFileCount / bookCount * 100 : 100; + const text = `${bookFileCount} / ${bookCount}`; return ( ); } -ArtistIndexProgressBar.propTypes = { +AuthorIndexProgressBar.propTypes = { monitored: PropTypes.bool.isRequired, status: PropTypes.string.isRequired, - trackCount: PropTypes.number.isRequired, - trackFileCount: PropTypes.number.isRequired, - totalTrackCount: PropTypes.number.isRequired, + bookCount: PropTypes.number.isRequired, + bookFileCount: PropTypes.number.isRequired, + totalBookCount: PropTypes.number.isRequired, posterWidth: PropTypes.number.isRequired, detailedProgressBar: PropTypes.bool.isRequired }; -export default ArtistIndexProgressBar; +export default AuthorIndexProgressBar; diff --git a/frontend/src/Author/Index/Table/AuthorIndexActionsCell.js b/frontend/src/Author/Index/Table/AuthorIndexActionsCell.js new file mode 100644 index 000000000..f3d59fedf --- /dev/null +++ b/frontend/src/Author/Index/Table/AuthorIndexActionsCell.js @@ -0,0 +1,102 @@ +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; +import { icons } from 'Helpers/Props'; +import IconButton from 'Components/Link/IconButton'; +import SpinnerIconButton from 'Components/Link/SpinnerIconButton'; +import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell'; +import EditAuthorModalConnector from 'Author/Edit/EditAuthorModalConnector'; +import DeleteAuthorModal from 'Author/Delete/DeleteAuthorModal'; + +class AuthorIndexActionsCell extends Component { + + // + // Lifecycle + + constructor(props, context) { + super(props, context); + + this.state = { + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: false + }; + } + + // + // Listeners + + onEditAuthorPress = () => { + this.setState({ isEditAuthorModalOpen: true }); + } + + onEditAuthorModalClose = () => { + this.setState({ isEditAuthorModalOpen: false }); + } + + onDeleteAuthorPress = () => { + this.setState({ + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: true + }); + } + + onDeleteAuthorModalClose = () => { + this.setState({ isDeleteAuthorModalOpen: false }); + } + + // + // Render + + render() { + const { + id, + isRefreshingAuthor, + onRefreshAuthorPress, + ...otherProps + } = this.props; + + const { + isEditAuthorModalOpen, + isDeleteAuthorModalOpen + } = this.state; + + return ( + + + + + + + + + + ); + } +} + +AuthorIndexActionsCell.propTypes = { + id: PropTypes.number.isRequired, + isRefreshingAuthor: PropTypes.bool.isRequired, + onRefreshAuthorPress: PropTypes.func.isRequired +}; + +export default AuthorIndexActionsCell; diff --git a/frontend/src/Artist/Index/Table/ArtistIndexHeader.css b/frontend/src/Author/Index/Table/AuthorIndexHeader.css similarity index 94% rename from frontend/src/Artist/Index/Table/ArtistIndexHeader.css rename to frontend/src/Author/Index/Table/AuthorIndexHeader.css index 6da0be920..60c67dde1 100644 --- a/frontend/src/Artist/Index/Table/ArtistIndexHeader.css +++ b/frontend/src/Author/Index/Table/AuthorIndexHeader.css @@ -18,7 +18,7 @@ flex-grow: 1; } -.artistType { +.authorType { composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; flex: 0 0 100px; @@ -31,8 +31,8 @@ flex: 1 0 125px; } -.nextAlbum, -.lastAlbum, +.nextBook, +.lastBook, .added, .genres { composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; @@ -40,20 +40,20 @@ flex: 0 0 180px; } -.albumCount { +.bookCount { composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; flex: 0 0 100px; } -.trackProgress, -.latestAlbum { +.bookProgress, +.latestBook { composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; flex: 0 0 150px; } -.trackCount { +.bookCount { composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; flex: 0 0 130px; diff --git a/frontend/src/Artist/Index/Table/ArtistIndexHeader.js b/frontend/src/Author/Index/Table/AuthorIndexHeader.js similarity index 89% rename from frontend/src/Artist/Index/Table/ArtistIndexHeader.js rename to frontend/src/Author/Index/Table/AuthorIndexHeader.js index aed47bafa..74e3eded9 100644 --- a/frontend/src/Artist/Index/Table/ArtistIndexHeader.js +++ b/frontend/src/Author/Index/Table/AuthorIndexHeader.js @@ -7,10 +7,10 @@ import VirtualTableHeader from 'Components/Table/VirtualTableHeader'; import VirtualTableHeaderCell from 'Components/Table/VirtualTableHeaderCell'; import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper'; import hasGrowableColumns from './hasGrowableColumns'; -import ArtistIndexTableOptionsConnector from './ArtistIndexTableOptionsConnector'; -import styles from './ArtistIndexHeader.css'; +import AuthorIndexTableOptionsConnector from './AuthorIndexTableOptionsConnector'; +import styles from './AuthorIndexHeader.css'; -function ArtistIndexHeader(props) { +function AuthorIndexHeader(props) { const { showBanners, columns, @@ -45,7 +45,7 @@ function ArtistIndexHeader(props) { { - this.setState({ isEditArtistModalOpen: true }); + onEditAuthorPress = () => { + this.setState({ isEditAuthorModalOpen: true }); } - onEditArtistModalClose = () => { - this.setState({ isEditArtistModalOpen: false }); + onEditAuthorModalClose = () => { + this.setState({ isEditAuthorModalOpen: false }); } - onDeleteArtistPress = () => { + onDeleteAuthorPress = () => { this.setState({ - isEditArtistModalOpen: false, - isDeleteArtistModalOpen: true + isEditAuthorModalOpen: false, + isDeleteAuthorModalOpen: true }); } - onDeleteArtistModalClose = () => { - this.setState({ isDeleteArtistModalOpen: false }); + onDeleteAuthorModalClose = () => { + this.setState({ isDeleteAuthorModalOpen: false }); } onUseSceneNumberingChange = () => { @@ -80,13 +80,13 @@ class ArtistIndexRow extends Component { id, monitored, status, - artistName, + authorName, titleSlug, - artistType, + authorType, qualityProfile, metadataProfile, - nextAlbum, - lastAlbum, + nextBook, + lastBook, added, statistics, genres, @@ -97,24 +97,23 @@ class ArtistIndexRow extends Component { showBanners, showSearchAction, columns, - isRefreshingArtist, - isSearchingArtist, - onRefreshArtistPress, + isRefreshingAuthor, + isSearchingAuthor, + onRefreshAuthorPress, onSearchPress } = this.props; const { - albumCount, - trackCount, - trackFileCount, - totalTrackCount, + bookCount, + bookFileCount, + totalBookCount, sizeOnDisk } = statistics; const { hasBannerError, - isEditArtistModalOpen, - isDeleteArtistModalOpen + isEditAuthorModalOpen, + isDeleteAuthorModalOpen } = this.state; return ( @@ -132,10 +131,10 @@ class ArtistIndexRow extends Component { if (name === 'status') { return ( - - - {artistName} + {authorName} } : - } ); } - if (name === 'artistType') { + if (name === 'authorType') { return ( - {artistType} + {authorType} ); } @@ -218,17 +217,17 @@ class ArtistIndexRow extends Component { ); } - if (name === 'nextAlbum') { - if (nextAlbum) { + if (name === 'nextBook') { + if (nextBook) { return ( - ); @@ -243,17 +242,17 @@ class ArtistIndexRow extends Component { ); } - if (name === 'lastAlbum') { - if (lastAlbum) { + if (name === 'lastBook') { + if (lastBook) { return ( - ); @@ -279,19 +278,8 @@ class ArtistIndexRow extends Component { ); } - if (name === 'albumCount') { - return ( - - {albumCount} - - ); - } - - if (name === 'trackProgress') { - const progress = trackCount ? trackFileCount / trackCount * 100 : 100; + if (name === 'bookProgress') { + const progress = bookCount ? bookFileCount / bookCount * 100 : 100; return ( ); } - if (name === 'trackCount') { - return ( - - {totalTrackCount} - - ); - } - if (name === 'path') { return ( { @@ -402,16 +379,16 @@ class ArtistIndexRow extends Component { } ); @@ -421,37 +398,37 @@ class ArtistIndexRow extends Component { }) } - - ); } } -ArtistIndexRow.propTypes = { +AuthorIndexRow.propTypes = { id: PropTypes.number.isRequired, monitored: PropTypes.bool.isRequired, status: PropTypes.string.isRequired, - artistName: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, - artistType: PropTypes.string, + authorType: PropTypes.string, qualityProfile: PropTypes.object.isRequired, metadataProfile: PropTypes.object.isRequired, - nextAlbum: PropTypes.object, - lastAlbum: PropTypes.object, + nextBook: PropTypes.object, + lastBook: PropTypes.object, added: PropTypes.string, statistics: PropTypes.object.isRequired, - latestAlbum: PropTypes.object, + latestBook: PropTypes.object, path: PropTypes.string.isRequired, genres: PropTypes.arrayOf(PropTypes.string).isRequired, ratings: PropTypes.object.isRequired, @@ -460,21 +437,20 @@ ArtistIndexRow.propTypes = { showBanners: PropTypes.bool.isRequired, showSearchAction: PropTypes.bool.isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired, - isRefreshingArtist: PropTypes.bool.isRequired, - isSearchingArtist: PropTypes.bool.isRequired, - onRefreshArtistPress: PropTypes.func.isRequired, + isRefreshingAuthor: PropTypes.bool.isRequired, + isSearchingAuthor: PropTypes.bool.isRequired, + onRefreshAuthorPress: PropTypes.func.isRequired, onSearchPress: PropTypes.func.isRequired }; -ArtistIndexRow.defaultProps = { +AuthorIndexRow.defaultProps = { statistics: { - albumCount: 0, - trackCount: 0, - trackFileCount: 0, - totalTrackCount: 0 + bookCount: 0, + bookFileCount: 0, + totalBookCount: 0 }, genres: [], tags: [] }; -export default ArtistIndexRow; +export default AuthorIndexRow; diff --git a/frontend/src/Artist/Index/Table/ArtistIndexTable.css b/frontend/src/Author/Index/Table/AuthorIndexTable.css similarity index 100% rename from frontend/src/Artist/Index/Table/ArtistIndexTable.css rename to frontend/src/Author/Index/Table/AuthorIndexTable.css diff --git a/frontend/src/Artist/Index/Table/ArtistIndexTable.js b/frontend/src/Author/Index/Table/AuthorIndexTable.js similarity index 80% rename from frontend/src/Artist/Index/Table/ArtistIndexTable.js rename to frontend/src/Author/Index/Table/AuthorIndexTable.js index 426c61a59..5ab6f9d1b 100644 --- a/frontend/src/Artist/Index/Table/ArtistIndexTable.js +++ b/frontend/src/Author/Index/Table/AuthorIndexTable.js @@ -4,12 +4,12 @@ import getIndexOfFirstCharacter from 'Utilities/Array/getIndexOfFirstCharacter'; import { sortDirections } from 'Helpers/Props'; import VirtualTable from 'Components/Table/VirtualTable'; import VirtualTableRow from 'Components/Table/VirtualTableRow'; -import ArtistIndexItemConnector from 'Artist/Index/ArtistIndexItemConnector'; -import ArtistIndexHeaderConnector from './ArtistIndexHeaderConnector'; -import ArtistIndexRow from './ArtistIndexRow'; -import styles from './ArtistIndexTable.css'; +import AuthorIndexItemConnector from 'Author/Index/AuthorIndexItemConnector'; +import AuthorIndexHeaderConnector from './AuthorIndexHeaderConnector'; +import AuthorIndexRow from './AuthorIndexRow'; +import styles from './AuthorIndexTable.css'; -class ArtistIndexTable extends Component { +class AuthorIndexTable extends Component { // // Lifecycle @@ -50,21 +50,21 @@ class ArtistIndexTable extends Component { showBanners } = this.props; - const artist = items[rowIndex]; + const author = items[rowIndex]; return ( - @@ -97,7 +97,7 @@ class ArtistIndexTable extends Component { overscanRowCount={2} rowRenderer={this.rowRenderer} header={ - state.app.dimensions, - (state) => state.artistIndex.tableOptions, - (state) => state.artistIndex.columns, + (state) => state.authorIndex.tableOptions, + (state) => state.authorIndex.columns, (dimensions, tableOptions, columns) => { return { isSmallScreen: dimensions.isSmallScreen, @@ -21,9 +21,9 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { onSortPress(sortKey) { - dispatch(setArtistSort({ sortKey })); + dispatch(setAuthorSort({ sortKey })); } }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(ArtistIndexTable); +export default connect(createMapStateToProps, createMapDispatchToProps)(AuthorIndexTable); diff --git a/frontend/src/Artist/Index/Table/ArtistIndexTableOptions.js b/frontend/src/Author/Index/Table/AuthorIndexTableOptions.js similarity index 94% rename from frontend/src/Artist/Index/Table/ArtistIndexTableOptions.js rename to frontend/src/Author/Index/Table/AuthorIndexTableOptions.js index 110a024e4..6963db3d7 100644 --- a/frontend/src/Artist/Index/Table/ArtistIndexTableOptions.js +++ b/frontend/src/Author/Index/Table/AuthorIndexTableOptions.js @@ -5,7 +5,7 @@ import FormGroup from 'Components/Form/FormGroup'; import FormLabel from 'Components/Form/FormLabel'; import FormInputGroup from 'Components/Form/FormInputGroup'; -class ArtistIndexTableOptions extends Component { +class AuthorIndexTableOptions extends Component { // // Lifecycle @@ -91,10 +91,10 @@ class ArtistIndexTableOptions extends Component { } } -ArtistIndexTableOptions.propTypes = { +AuthorIndexTableOptions.propTypes = { showBanners: PropTypes.bool.isRequired, showSearchAction: PropTypes.bool.isRequired, onTableOptionChange: PropTypes.func.isRequired }; -export default ArtistIndexTableOptions; +export default AuthorIndexTableOptions; diff --git a/frontend/src/Artist/Index/Table/ArtistIndexTableOptionsConnector.js b/frontend/src/Author/Index/Table/AuthorIndexTableOptionsConnector.js similarity index 55% rename from frontend/src/Artist/Index/Table/ArtistIndexTableOptionsConnector.js rename to frontend/src/Author/Index/Table/AuthorIndexTableOptionsConnector.js index 0a1607cf2..0bae4b2dc 100644 --- a/frontend/src/Artist/Index/Table/ArtistIndexTableOptionsConnector.js +++ b/frontend/src/Author/Index/Table/AuthorIndexTableOptionsConnector.js @@ -1,14 +1,14 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import ArtistIndexTableOptions from './ArtistIndexTableOptions'; +import AuthorIndexTableOptions from './AuthorIndexTableOptions'; function createMapStateToProps() { return createSelector( - (state) => state.artistIndex.tableOptions, + (state) => state.authorIndex.tableOptions, (tableOptions) => { return tableOptions; } ); } -export default connect(createMapStateToProps)(ArtistIndexTableOptions); +export default connect(createMapStateToProps)(AuthorIndexTableOptions); diff --git a/frontend/src/Artist/Index/Table/ArtistStatusCell.css b/frontend/src/Author/Index/Table/AuthorStatusCell.css similarity index 100% rename from frontend/src/Artist/Index/Table/ArtistStatusCell.css rename to frontend/src/Author/Index/Table/AuthorStatusCell.css diff --git a/frontend/src/Artist/Index/Table/ArtistStatusCell.js b/frontend/src/Author/Index/Table/AuthorStatusCell.js similarity index 67% rename from frontend/src/Artist/Index/Table/ArtistStatusCell.js rename to frontend/src/Author/Index/Table/AuthorStatusCell.js index 26fde0e12..8cb12c03e 100644 --- a/frontend/src/Artist/Index/Table/ArtistStatusCell.js +++ b/frontend/src/Author/Index/Table/AuthorStatusCell.js @@ -3,19 +3,19 @@ import React from 'react'; import { icons } from 'Helpers/Props'; import Icon from 'Components/Icon'; import VirtualTableRowCell from 'Components/Table/Cells/TableRowCell'; -import styles from './ArtistStatusCell.css'; +import styles from './AuthorStatusCell.css'; -function ArtistStatusCell(props) { +function AuthorStatusCell(props) { const { className, - artistType, + authorType, monitored, status, component: Component, ...otherProps } = props; - const endedString = artistType === 'Person' ? 'Deceased' : 'Ended'; + const endedString = authorType === 'Person' ? 'Deceased' : 'Ended'; return ( ); } -ArtistStatusCell.propTypes = { +AuthorStatusCell.propTypes = { className: PropTypes.string.isRequired, - artistType: PropTypes.string, + authorType: PropTypes.string, monitored: PropTypes.bool.isRequired, status: PropTypes.string.isRequired, component: PropTypes.elementType }; -ArtistStatusCell.defaultProps = { +AuthorStatusCell.defaultProps = { className: styles.status, component: VirtualTableRowCell }; -export default ArtistStatusCell; +export default AuthorStatusCell; diff --git a/frontend/src/Artist/Index/Table/hasGrowableColumns.js b/frontend/src/Author/Index/Table/hasGrowableColumns.js similarity index 100% rename from frontend/src/Artist/Index/Table/hasGrowableColumns.js rename to frontend/src/Author/Index/Table/hasGrowableColumns.js diff --git a/frontend/src/Artist/MoveArtist/MoveArtistModal.css b/frontend/src/Author/MoveAuthor/MoveAuthorModal.css similarity index 100% rename from frontend/src/Artist/MoveArtist/MoveArtistModal.css rename to frontend/src/Author/MoveAuthor/MoveAuthorModal.css diff --git a/frontend/src/Artist/MoveArtist/MoveArtistModal.js b/frontend/src/Author/MoveAuthor/MoveAuthorModal.js similarity index 82% rename from frontend/src/Artist/MoveArtist/MoveArtistModal.js rename to frontend/src/Author/MoveAuthor/MoveAuthorModal.js index 3f78187ff..4141c94de 100644 --- a/frontend/src/Artist/MoveArtist/MoveArtistModal.js +++ b/frontend/src/Author/MoveAuthor/MoveAuthorModal.js @@ -7,16 +7,16 @@ 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 styles from './MoveArtistModal.css'; +import styles from './MoveAuthorModal.css'; -function MoveArtistModal(props) { +function MoveAuthorModal(props) { const { originalPath, destinationPath, destinationRootFolder, isOpen, onSavePress, - onMoveArtistPress + onMoveAuthorPress } = props; if ( @@ -46,8 +46,8 @@ function MoveArtistModal(props) { { destinationRootFolder ? - `Would you like to move the artist folders to '${destinationRootFolder}'?` : - `Would you like to move the artist files from '${originalPath}' to '${destinationPath}'?` + `Would you like to move the author folders to '${destinationRootFolder}'?` : + `Would you like to move the author files from '${originalPath}' to '${destinationPath}'?` } @@ -61,7 +61,7 @@ function MoveArtistModal(props) { @@ -71,13 +71,13 @@ function MoveArtistModal(props) { ); } -MoveArtistModal.propTypes = { +MoveAuthorModal.propTypes = { originalPath: PropTypes.string, destinationPath: PropTypes.string, destinationRootFolder: PropTypes.string, isOpen: PropTypes.bool.isRequired, onSavePress: PropTypes.func.isRequired, - onMoveArtistPress: PropTypes.func.isRequired + onMoveAuthorPress: PropTypes.func.isRequired }; -export default MoveArtistModal; +export default MoveAuthorModal; diff --git a/frontend/src/Artist/NoArtist.css b/frontend/src/Author/NoAuthor.css similarity index 100% rename from frontend/src/Artist/NoArtist.css rename to frontend/src/Author/NoAuthor.css diff --git a/frontend/src/Artist/NoArtist.js b/frontend/src/Author/NoAuthor.js similarity index 90% rename from frontend/src/Artist/NoArtist.js rename to frontend/src/Author/NoAuthor.js index 0615fe058..edbcf70fd 100644 --- a/frontend/src/Artist/NoArtist.js +++ b/frontend/src/Author/NoAuthor.js @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import { kinds } from 'Helpers/Props'; import Button from 'Components/Link/Button'; -import styles from './NoArtist.css'; +import styles from './NoAuthor.css'; -function NoArtist(props) { +function NoAuthor(props) { const { totalItems } = props; if (totalItems > 0) { @@ -44,8 +44,8 @@ function NoArtist(props) { ); } -NoArtist.propTypes = { +NoAuthor.propTypes = { totalItems: PropTypes.number.isRequired }; -export default NoArtist; +export default NoAuthor; diff --git a/frontend/src/Album/AlbumCover.js b/frontend/src/Book/BookCover.js similarity index 94% rename from frontend/src/Album/AlbumCover.js rename to frontend/src/Book/BookCover.js index 538fa5db8..22fde5ae4 100644 --- a/frontend/src/Album/AlbumCover.js +++ b/frontend/src/Book/BookCover.js @@ -1,12 +1,12 @@ import PropTypes from 'prop-types'; import React from 'react'; -import ArtistImage from 'Artist/ArtistImage'; +import AuthorImage from 'Author/AuthorImage'; const coverPlaceholder = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPcAAAD3AgMAAAC84irAAAAADFBMVEUyMjI7Ozs1NTU4ODjgOsZvAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+EJEBIzDdm9OfoAAAbkSURBVGje7Zq9b9s4FMBZFgUkBR27C3cw0MromL1jxwyVZASB67G4qWPgoSAyBdm9CwECKCp8nbIccGj/Ce/BTUb3Lh3aI997pCjnTnyyt0JcIif5+ZHvPZLvQ0KMYxzjGMc4xjGOcYxjHOP4JUfSfP7RVPvSH3MYX/eC5aecxne1v+w95WebFs/rwVO/8+h8PnT6t3ln/DFQuJ06/SyHiX9pxa7o5/lewkuLDxLvhM8tPki8g07dU8Gnj5zGlw7P79n4pDVYi8/YuHO4n03z0z6XXDom4G3TXDdN840+LobN/W1Ty2slHD8bNvevlUgutLmTj4NmT3pf6mMGcJGth+gefaZsDCjB2Wj65wN8ZmnAGnE6eFieI1FvcEISLjIUr9hm+w7PFeHiE9t0E7dyIatE48odXTPu0j/A3BMnXf7NXDxudTxbE2VxMWVu+sfwf3i1ZMLiaQLf+iWIP4VtjtTzFhc35vfveZrb4nPt4R95ulu1cxeVh8Psw7rzbgWp8dWHyr83WJpbgjypjS5XeZnqRxmJNUd3MS1d6ue/tOn0WuayNd2CoTlaeqwnIVeOgcWHdHdMS9cSN1vCy3bxZwzFm6VL7QA14WTudVj1sFvf4ReZNSCO0IvwngXFV3hkFcriuPokrPrYbYxjVAHiZ24zLYIeP7/E4xZUgHiZWt29D9ptGemHR7mPo9B10HLGbucRfs/Ww2f2CD4L2u0+wofKwwvrd0XoqCmr38CAZa1d58LesEpvgqtN4MCR1mVj2nZWOiweVB/CAXuyi59Y1auA2eekg6Xw8Tfm013A8LFV8mYXL61ZF4Hb8Zx8d9vBtbdG7s99XvOOZlF38QVtmlkAv0ffxTOjxU/o5p8FvKbSszw2ik87+Iz23Lwf134RiWf2tG3xN2T4oh8vDO4U33z+5qnefFnR77OA2wheh2WfbJBHeI/XgtNJEaHdtJNrvPn8E8eV/kW/2xn8FDc77LemOyq4J1XvSbds7SZ3cAV+86UXP283TGaFUk4ZwmNyugne8FaqxdHtFkH8GNewg2cc3PjsM7CbbNdMwQJ47aL3mP5H308ar5XOn2nUwpx+4hrx/z+qn5DBNqD4rMUpWACnPwnhkfa9SnZwvX1MnHLVi08cPle+0wBuAsykd8dO0KkS9L0dPCO37MVLxJc6nPHdTeNT/ZeLDQN/DEFpBzc33Bfckhx8K1q7IS5vuPgjbTf5AL97zcALxFUHN76QrF7heTHru54RN3bbxTeEn4Xx04f4NOfhSuPLncmnQk3z1yLlSE8fabtFHVyZyIQlXes8zrdSJR5ea7k3+asUooXg2mO4oDprT/XdHpROhouL/8A3edBw5DYxBhYdn08Q53jd0elDfApHbHjL6Hk/pvvNd1rEWdLl9iG+hpMgiMMdVEM64B8X5nq6ZBwX5rCSeK/4uInJROiwetLi0jtpG0yJBPOkTVQXryEPKqMQbq6JeyUTvUOkilq/EVGmo5NIpP3XRIzhXIafrjzF30JUIqecKxIjOpF6il9jbHTLxjs3rN5voPH+GxbDA1m7GrM9a4zdTigdCUUXD2MSSEAXQRxDo2QHl2iwV+h7gchqLrLrhmKxH/Z6nqLUQD5AYSHWAEwk+Z1Ck1vEAmEhBaVtufDtj8Zmv6U+PQNBqbDf/szVR5XNvQteSAzRyeQhzgnIKR2Invq43gQb4+oRaJCTTcRd6RkzGXlJQe3vDq8gsDB2S0QaSoViwKNW9Sh9zUzEMA2MWtU7nJUGYhIa4bnjcLthgkkopMAGj3dxXgoMCbg+laTFL8luSn9pFkrAMf031cmVJz0jXzsKFm6OSfVqYnEILPKZDjeicPFhQoaHbMhKX+NmZ5Q+ntr8n5obhGPVKlx48cs+FteKP3MlswWv6CSPHK4Dmntm0ckreW0snmxKbsnLFdyo4mrwjLYJo+Dmyn0k3uDTEpMRTrnPKza+IHy9wGSEU2yMvSrvHeJ/Qt2UV+p0hVacvsah0psKXqEVy7y2tPu3xhM1oMxLReY00tAlJG9JFZktzCwyU4lbuqQ7U22VN1zi9gvsIP05PjAL7H55H/C6rREzyvu41bbS4VXb1OV0FLG1YVsa1J1gtzaosVJbHO3Gb6z4bR2H89s61FRqCIcgL+E3lfyWlsaN3eR6QDP0pSdeKqOEZjOgoda285SUl5W+Jga181wz0WQFF2poM7FtZTZKXlXZ0Fam10htroY3Ug9s43pN5OJ2jyZy28Iu1nu0sNsGenGzRwO9bd8Xd/u0793LA8Vmn5cHnPhiH+Gt+HIv4Ye+tnHoSyMHvrJy6Aszh76uc+DLQuLQV5XGMY5xjGMc4xjHOMYxjnH80uNfW99BeoyzJCoAAAAASUVORK5CYII='; -function AlbumCover(props) { +function BookCover(props) { return ( - + - @@ -69,12 +69,12 @@ class AlbumSearchCell extends Component { } } -AlbumSearchCell.propTypes = { +BookSearchCell.propTypes = { bookId: PropTypes.number.isRequired, authorId: PropTypes.number.isRequired, - albumTitle: PropTypes.string.isRequired, + bookTitle: PropTypes.string.isRequired, isSearching: PropTypes.bool.isRequired, onSearchPress: PropTypes.func.isRequired }; -export default AlbumSearchCell; +export default BookSearchCell; diff --git a/frontend/src/Album/AlbumSearchCellConnector.js b/frontend/src/Book/BookSearchCellConnector.js similarity index 70% rename from frontend/src/Album/AlbumSearchCellConnector.js rename to frontend/src/Book/BookSearchCellConnector.js index 3182d159e..46276e027 100644 --- a/frontend/src/Album/AlbumSearchCellConnector.js +++ b/frontend/src/Book/BookSearchCellConnector.js @@ -1,22 +1,22 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { isCommandExecuting } from 'Utilities/Command'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createCommandsSelector from 'Store/Selectors/createCommandsSelector'; import { executeCommand } from 'Store/Actions/commandActions'; import * as commandNames from 'Commands/commandNames'; -import AlbumSearchCell from './AlbumSearchCell'; +import BookSearchCell from './BookSearchCell'; function createMapStateToProps() { return createSelector( (state, { bookId }) => bookId, - createArtistSelector(), + createAuthorSelector(), createCommandsSelector(), - (bookId, artist, commands) => { + (bookId, author, commands) => { const isSearching = commands.some((command) => { - const albumSearch = command.name === commandNames.ALBUM_SEARCH; + const bookSearch = command.name === commandNames.BOOK_SEARCH; - if (!albumSearch) { + if (!bookSearch) { return false; } @@ -27,8 +27,8 @@ function createMapStateToProps() { }); return { - artistMonitored: artist.monitored, - artistType: artist.artistType, + authorMonitored: author.monitored, + authorType: author.authorType, isSearching }; } @@ -39,11 +39,11 @@ function createMapDispatchToProps(dispatch, props) { return { onSearchPress(name, path) { dispatch(executeCommand({ - name: commandNames.ALBUM_SEARCH, + name: commandNames.BOOK_SEARCH, bookIds: [props.bookId] })); } }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(AlbumSearchCell); +export default connect(createMapStateToProps, createMapDispatchToProps)(BookSearchCell); diff --git a/frontend/src/Album/AlbumTitleLink.css b/frontend/src/Book/BookTitleLink.css similarity index 100% rename from frontend/src/Album/AlbumTitleLink.css rename to frontend/src/Book/BookTitleLink.css diff --git a/frontend/src/Album/AlbumTitleLink.js b/frontend/src/Book/BookTitleLink.js similarity index 75% rename from frontend/src/Album/AlbumTitleLink.js rename to frontend/src/Book/BookTitleLink.js index 8fe86db47..1f13a922b 100644 --- a/frontend/src/Album/AlbumTitleLink.js +++ b/frontend/src/Book/BookTitleLink.js @@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import Link from 'Components/Link/Link'; -function AlbumTitleLink({ titleSlug, title, disambiguation }) { +function BookTitleLink({ titleSlug, title, disambiguation }) { const link = `/book/${titleSlug}`; return ( @@ -12,10 +12,10 @@ function AlbumTitleLink({ titleSlug, title, disambiguation }) { ); } -AlbumTitleLink.propTypes = { +BookTitleLink.propTypes = { titleSlug: PropTypes.string.isRequired, title: PropTypes.string.isRequired, disambiguation: PropTypes.string }; -export default AlbumTitleLink; +export default BookTitleLink; diff --git a/frontend/src/Album/Delete/DeleteAlbumModal.js b/frontend/src/Book/Delete/DeleteBookModal.js similarity index 69% rename from frontend/src/Album/Delete/DeleteAlbumModal.js rename to frontend/src/Book/Delete/DeleteBookModal.js index a18644d64..b955b0775 100644 --- a/frontend/src/Album/Delete/DeleteAlbumModal.js +++ b/frontend/src/Book/Delete/DeleteBookModal.js @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import { sizes } from 'Helpers/Props'; import Modal from 'Components/Modal/Modal'; -import DeleteAlbumModalContentConnector from './DeleteAlbumModalContentConnector'; +import DeleteBookModalContentConnector from './DeleteBookModalContentConnector'; -function DeleteAlbumModal(props) { +function DeleteBookModal(props) { const { isOpen, onModalClose, @@ -17,7 +17,7 @@ function DeleteAlbumModal(props) { size={sizes.MEDIUM} onModalClose={onModalClose} > - @@ -25,9 +25,9 @@ function DeleteAlbumModal(props) { ); } -DeleteAlbumModal.propTypes = { +DeleteBookModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default DeleteAlbumModal; +export default DeleteBookModal; diff --git a/frontend/src/Artist/Delete/DeleteArtistModalContent.css b/frontend/src/Book/Delete/DeleteBookModalContent.css similarity index 100% rename from frontend/src/Artist/Delete/DeleteArtistModalContent.css rename to frontend/src/Book/Delete/DeleteBookModalContent.css diff --git a/frontend/src/Album/Delete/DeleteAlbumModalContent.js b/frontend/src/Book/Delete/DeleteBookModalContent.js similarity index 78% rename from frontend/src/Album/Delete/DeleteAlbumModalContent.js rename to frontend/src/Book/Delete/DeleteBookModalContent.js index eb2ca2dd9..70fb2767e 100644 --- a/frontend/src/Album/Delete/DeleteAlbumModalContent.js +++ b/frontend/src/Book/Delete/DeleteBookModalContent.js @@ -10,9 +10,9 @@ 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 styles from './DeleteAlbumModalContent.css'; +import styles from './DeleteBookModalContent.css'; -class DeleteAlbumModalContent extends Component { +class DeleteBookModalContent extends Component { // // Lifecycle @@ -37,7 +37,7 @@ class DeleteAlbumModalContent extends Component { this.setState({ addImportListExclusion: value }); } - onDeleteAlbumConfirmed = () => { + onDeleteBookConfirmed = () => { const deleteFiles = this.state.deleteFiles; const addImportListExclusion = this.state.addImportListExclusion; @@ -57,15 +57,15 @@ class DeleteAlbumModalContent extends Component { } = this.props; const { - trackFileCount, + bookFileCount, sizeOnDisk } = statistics; const deleteFiles = this.state.deleteFiles; const addImportListExclusion = this.state.addImportListExclusion; - const deleteFilesLabel = `Delete ${trackFileCount} Track Files`; - const deleteFilesHelpText = 'Delete the track files'; + const deleteFilesLabel = `Delete ${bookFileCount} Book Files`; + const deleteFilesHelpText = 'Delete the book files'; return ( @@ -106,18 +106,18 @@ class DeleteAlbumModalContent extends Component { { !addImportListExclusion &&
-
If you don't add an import list exclusion and the artist has a metadata profile other than 'None' then this album may be re-added during the next artist refresh.
+
If you don't add an import list exclusion and the author has a metadata profile other than 'None' then this book may be re-added during the next author refresh.
} { deleteFiles &&
-
The album's files will be deleted.
+
The book's files will be deleted.
{ - !!trackFileCount && -
{trackFileCount} track files totaling {formatBytes(sizeOnDisk)}
+ !!bookFileCount && +
{bookFileCount} book files totaling {formatBytes(sizeOnDisk)}
}
} @@ -131,7 +131,7 @@ class DeleteAlbumModalContent extends Component { @@ -141,17 +141,17 @@ class DeleteAlbumModalContent extends Component { } } -DeleteAlbumModalContent.propTypes = { +DeleteBookModalContent.propTypes = { title: PropTypes.string.isRequired, statistics: PropTypes.object.isRequired, onDeletePress: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; -DeleteAlbumModalContent.defaultProps = { +DeleteBookModalContent.defaultProps = { statistics: { - trackFileCount: 0 + bookFileCount: 0 } }; -export default DeleteAlbumModalContent; +export default DeleteBookModalContent; diff --git a/frontend/src/Album/Delete/DeleteAlbumModalContentConnector.js b/frontend/src/Book/Delete/DeleteBookModalContentConnector.js similarity index 65% rename from frontend/src/Album/Delete/DeleteAlbumModalContentConnector.js rename to frontend/src/Book/Delete/DeleteBookModalContentConnector.js index 887aeddfd..9e918588e 100644 --- a/frontend/src/Album/Delete/DeleteAlbumModalContentConnector.js +++ b/frontend/src/Book/Delete/DeleteBookModalContentConnector.js @@ -3,31 +3,31 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { push } from 'connected-react-router'; -import createAlbumSelector from 'Store/Selectors/createAlbumSelector'; -import { deleteAlbum } from 'Store/Actions/albumActions'; -import DeleteAlbumModalContent from './DeleteAlbumModalContent'; +import createBookSelector from 'Store/Selectors/createBookSelector'; +import { deleteBook } from 'Store/Actions/bookActions'; +import DeleteBookModalContent from './DeleteBookModalContent'; function createMapStateToProps() { return createSelector( - createAlbumSelector(), - (album) => { - return album; + createBookSelector(), + (book) => { + return book; } ); } const mapDispatchToProps = { push, - deleteAlbum + deleteBook }; -class DeleteAlbumModalContentConnector extends Component { +class DeleteBookModalContentConnector extends Component { // // Listeners onDeletePress = (deleteFiles, addImportListExclusion) => { - this.props.deleteAlbum({ + this.props.deleteBook({ id: this.props.bookId, deleteFiles, addImportListExclusion @@ -43,7 +43,7 @@ class DeleteAlbumModalContentConnector extends Component { render() { return ( - @@ -51,12 +51,12 @@ class DeleteAlbumModalContentConnector extends Component { } } -DeleteAlbumModalContentConnector.propTypes = { +DeleteBookModalContentConnector.propTypes = { bookId: PropTypes.number.isRequired, titleSlug: PropTypes.string.isRequired, push: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired, - deleteAlbum: PropTypes.func.isRequired + deleteBook: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(DeleteAlbumModalContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(DeleteBookModalContentConnector); diff --git a/frontend/src/Album/Details/AlbumDetails.css b/frontend/src/Book/Details/BookDetails.css similarity index 96% rename from frontend/src/Album/Details/AlbumDetails.css rename to frontend/src/Book/Details/BookDetails.css index d7988aedb..cfce6f02a 100644 --- a/frontend/src/Album/Details/AlbumDetails.css +++ b/frontend/src/Book/Details/BookDetails.css @@ -82,11 +82,11 @@ margin-left: 20px; } -.albumNavigationButtons { +.bookNavigationButtons { white-space: nowrap; } -.albumNavigationButton { +.bookNavigationButton { composes: button from '~Components/Link/IconButton.css'; margin-left: 5px; @@ -160,6 +160,10 @@ margin-top: 20px; } +.filterIcon { + float: right; +} + @media only screen and (max-width: $breakpointSmall) { .contentContainer { padding: 20px 0; diff --git a/frontend/src/Album/Details/AlbumDetails.js b/frontend/src/Book/Details/BookDetails.js similarity index 84% rename from frontend/src/Album/Details/AlbumDetails.js rename to frontend/src/Book/Details/BookDetails.js index c1786b0bf..0cb83f59c 100644 --- a/frontend/src/Album/Details/AlbumDetails.js +++ b/frontend/src/Book/Details/BookDetails.js @@ -15,10 +15,10 @@ import IconButton from 'Components/Link/IconButton'; import Label from 'Components/Label'; import MonitorToggleButton from 'Components/MonitorToggleButton'; import Tooltip from 'Components/Tooltip/Tooltip'; -import AlbumCover from 'Album/AlbumCover'; +import BookCover from 'Book/BookCover'; import OrganizePreviewModalConnector from 'Organize/OrganizePreviewModalConnector'; // import RetagPreviewModalConnector from 'Retag/RetagPreviewModalConnector'; -import DeleteAlbumModal from 'Album/Delete/DeleteAlbumModal'; +import DeleteBookModal from 'Book/Delete/DeleteBookModal'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import PageContent from 'Components/Page/PageContent'; import PageContentBodyConnector from 'Components/Page/PageContentBodyConnector'; @@ -26,12 +26,12 @@ import PageToolbar from 'Components/Page/Toolbar/PageToolbar'; import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator'; import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton'; -import ArtistHistoryTable from 'Artist/History/ArtistHistoryTable'; +import AuthorHistoryTable from 'Author/History/AuthorHistoryTable'; import InteractiveSearchTable from 'InteractiveSearch/InteractiveSearchTable'; import InteractiveSearchFilterMenuConnector from 'InteractiveSearch/InteractiveSearchFilterMenuConnector'; -import TrackFileEditorTable from 'TrackFile/Editor/TrackFileEditorTable'; -import AlbumDetailsLinks from './AlbumDetailsLinks'; -import styles from './AlbumDetails.css'; +import BookFileEditorTable from 'BookFile/Editor/BookFileEditorTable'; +import BookDetailsLinks from './BookDetailsLinks'; +import styles from './BookDetails.css'; const defaultFontSize = parseInt(fonts.defaultFontSize); const lineHeight = parseFloat(fonts.lineHeight); @@ -74,7 +74,7 @@ function getExpandedState(newState) { }; } -class AlbumDetails extends Component { +class BookDetails extends Component { // // Lifecycle @@ -85,7 +85,7 @@ class AlbumDetails extends Component { this.state = { isOrganizeModalOpen: false, isRetagModalOpen: false, - isDeleteAlbumModalOpen: false, + isDeleteBookModalOpen: false, allExpanded: false, allCollapsed: false, expandedState: {}, @@ -112,14 +112,14 @@ class AlbumDetails extends Component { this.setState({ isRetagModalOpen: false }); } - onDeleteAlbumPress = () => { + onDeleteBookPress = () => { this.setState({ - isDeleteAlbumModalOpen: true + isDeleteBookModalOpen: true }); } - onDeleteAlbumModalClose = () => { - this.setState({ isDeleteAlbumModalOpen: false }); + onDeleteBookModalClose = () => { + this.setState({ isDeleteBookModalOpen: false }); } onExpandAllPress = () => { @@ -165,12 +165,12 @@ class AlbumDetails extends Component { isSaving, isFetching, isPopulated, - trackFilesError, - hasTrackFiles, + bookFilesError, + hasBookFiles, shortDateFormat, - artist, - previousAlbum, - nextAlbum, + author, + previousBook, + nextBook, isSearching, onMonitorTogglePress, onSearchPress @@ -179,7 +179,7 @@ class AlbumDetails extends Component { const { isOrganizeModalOpen, // isRetagModalOpen, - isDeleteAlbumModalOpen, + isDeleteBookModalOpen, allExpanded, allCollapsed, selectedTabIndex @@ -198,7 +198,7 @@ class AlbumDetails extends Component { @@ -225,7 +225,7 @@ class AlbumDetails extends Component { @@ -243,14 +243,14 @@ class AlbumDetails extends Component {
-
-
+
@@ -384,7 +384,7 @@ class AlbumDetails extends Component { } tooltip={ - @@ -406,12 +406,12 @@ class AlbumDetails extends Component {
{ - !isPopulated && !trackFilesError && + !isPopulated && !bookFilesError && } { - !isFetching && trackFilesError && + !isFetching && bookFilesError &&
Loading book files failed
} @@ -444,7 +444,7 @@ class AlbumDetails extends Component { selectedTabIndex === 1 &&
} @@ -452,8 +452,8 @@ class AlbumDetails extends Component { - @@ -461,13 +461,13 @@ class AlbumDetails extends Component { - @@ -476,23 +476,23 @@ class AlbumDetails extends Component { {/* */} - @@ -501,7 +501,7 @@ class AlbumDetails extends Component { } } -AlbumDetails.propTypes = { +BookDetails.propTypes = { id: PropTypes.number.isRequired, titleSlug: PropTypes.string.isRequired, title: PropTypes.string.isRequired, @@ -519,18 +519,18 @@ AlbumDetails.propTypes = { isSearching: PropTypes.bool, isFetching: PropTypes.bool, isPopulated: PropTypes.bool, - trackFilesError: PropTypes.object, - hasTrackFiles: PropTypes.bool.isRequired, - artist: PropTypes.object, - previousAlbum: PropTypes.object, - nextAlbum: PropTypes.object, + bookFilesError: PropTypes.object, + hasBookFiles: PropTypes.bool.isRequired, + author: PropTypes.object, + previousBook: PropTypes.object, + nextBook: PropTypes.object, onMonitorTogglePress: PropTypes.func.isRequired, onRefreshPress: PropTypes.func, onSearchPress: PropTypes.func.isRequired }; -AlbumDetails.defaultProps = { +BookDetails.defaultProps = { isSaving: false }; -export default AlbumDetails; +export default BookDetails; diff --git a/frontend/src/Album/Details/AlbumDetailsConnector.js b/frontend/src/Book/Details/BookDetailsConnector.js similarity index 55% rename from frontend/src/Album/Details/AlbumDetailsConnector.js rename to frontend/src/Book/Details/BookDetailsConnector.js index 462ae778b..5e46528d6 100644 --- a/frontend/src/Album/Details/AlbumDetailsConnector.js +++ b/frontend/src/Book/Details/BookDetailsConnector.js @@ -7,32 +7,32 @@ import { createSelector } from 'reselect'; import { findCommand, isCommandExecuting } from 'Utilities/Command'; import { registerPagePopulator, unregisterPagePopulator } from 'Utilities/pagePopulator'; import createCommandsSelector from 'Store/Selectors/createCommandsSelector'; -import { toggleAlbumsMonitored } from 'Store/Actions/albumActions'; -import { fetchTrackFiles, clearTrackFiles } from 'Store/Actions/trackFileActions'; +import { toggleBooksMonitored } from 'Store/Actions/bookActions'; +import { fetchBookFiles, clearBookFiles } from 'Store/Actions/bookFileActions'; import { clearReleases, cancelFetchReleases } from 'Store/Actions/releaseActions'; import { executeCommand } from 'Store/Actions/commandActions'; import * as commandNames from 'Commands/commandNames'; -import AlbumDetails from './AlbumDetails'; -import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector'; +import BookDetails from './BookDetails'; +import createAllAuthorSelector from 'Store/Selectors/createAllAuthorsSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; -const selectTrackFiles = createSelector( - (state) => state.trackFiles, - (trackFiles) => { +const selectBookFiles = createSelector( + (state) => state.bookFiles, + (bookFiles) => { const { items, isFetching, isPopulated, error - } = trackFiles; + } = bookFiles; - const hasTrackFiles = !!items.length; + const hasBookFiles = !!items.length; return { - isTrackFilesFetching: isFetching, - isTrackFilesPopulated: isPopulated, - trackFilesError: error, - hasTrackFiles + isBookFilesFetching: isFetching, + isBookFilesPopulated: isPopulated, + bookFilesError: error, + hasBookFiles }; } ); @@ -40,50 +40,50 @@ const selectTrackFiles = createSelector( function createMapStateToProps() { return createSelector( (state, { titleSlug }) => titleSlug, - selectTrackFiles, - (state) => state.albums, - createAllArtistSelector(), + selectBookFiles, + (state) => state.books, + createAllAuthorSelector(), createCommandsSelector(), createUISettingsSelector(), - (titleSlug, trackFiles, albums, artists, commands, uiSettings) => { - const sortedAlbums = _.orderBy(albums.items, 'releaseDate'); - const albumIndex = _.findIndex(sortedAlbums, { titleSlug }); - const album = sortedAlbums[albumIndex]; - const artist = _.find(artists, { id: album.authorId }); + (titleSlug, bookFiles, books, authors, commands, uiSettings) => { + const sortedBooks = _.orderBy(books.items, 'releaseDate'); + const bookIndex = _.findIndex(sortedBooks, { titleSlug }); + const book = sortedBooks[bookIndex]; + const author = _.find(authors, { id: book.authorId }); - if (!album) { + if (!book) { return {}; } const { - isTrackFilesFetching, - isTrackFilesPopulated, - trackFilesError, - hasTrackFiles - } = trackFiles; - - const previousAlbum = sortedAlbums[albumIndex - 1] || _.last(sortedAlbums); - const nextAlbum = sortedAlbums[albumIndex + 1] || _.first(sortedAlbums); - const isSearchingCommand = findCommand(commands, { name: commandNames.ALBUM_SEARCH }); + isBookFilesFetching, + isBookFilesPopulated, + bookFilesError, + hasBookFiles + } = bookFiles; + + const previousBook = sortedBooks[bookIndex - 1] || _.last(sortedBooks); + const nextBook = sortedBooks[bookIndex + 1] || _.first(sortedBooks); + const isSearchingCommand = findCommand(commands, { name: commandNames.BOOK_SEARCH }); const isSearching = ( isCommandExecuting(isSearchingCommand) && - isSearchingCommand.body.bookIds.indexOf(album.id) > -1 + isSearchingCommand.body.bookIds.indexOf(book.id) > -1 ); - const isFetching = isTrackFilesFetching; - const isPopulated = isTrackFilesPopulated; + const isFetching = isBookFilesFetching; + const isPopulated = isBookFilesPopulated; return { - ...album, + ...book, shortDateFormat: uiSettings.shortDateFormat, - artist, + author, isSearching, isFetching, isPopulated, - trackFilesError, - hasTrackFiles, - previousAlbum, - nextAlbum + bookFilesError, + hasBookFiles, + previousBook, + nextBook }; } ); @@ -91,14 +91,14 @@ function createMapStateToProps() { const mapDispatchToProps = { executeCommand, - fetchTrackFiles, - clearTrackFiles, + fetchBookFiles, + clearBookFiles, clearReleases, cancelFetchReleases, - toggleAlbumsMonitored + toggleBooksMonitored }; -class AlbumDetailsConnector extends Component { +class BookDetailsConnector extends Component { componentDidMount() { registerPagePopulator(this.populate); @@ -106,7 +106,7 @@ class AlbumDetailsConnector extends Component { } componentDidUpdate(prevProps) { - // If the id has changed we need to clear the albums + // If the id has changed we need to clear the books // files and fetch from the server. if (prevProps.id !== this.props.id) { @@ -126,20 +126,20 @@ class AlbumDetailsConnector extends Component { populate = () => { const bookId = this.props.id; - this.props.fetchTrackFiles({ bookId }); + this.props.fetchBookFiles({ bookId }); } unpopulate = () => { this.props.cancelFetchReleases(); this.props.clearReleases(); - this.props.clearTrackFiles(); + this.props.clearBookFiles(); } // // Listeners onMonitorTogglePress = (monitored) => { - this.props.toggleAlbumsMonitored({ + this.props.toggleBooksMonitored({ bookIds: [this.props.id], monitored }); @@ -147,7 +147,7 @@ class AlbumDetailsConnector extends Component { onSearchPress = () => { this.props.executeCommand({ - name: commandNames.ALBUM_SEARCH, + name: commandNames.BOOK_SEARCH, bookIds: [this.props.id] }); } @@ -157,7 +157,7 @@ class AlbumDetailsConnector extends Component { render() { return ( - match, - (state) => state.albums, - (state) => state.artist, - (match, albums, artist) => { + (state) => state.books, + (state) => state.authors, + (match, books, author) => { const titleSlug = match.params.titleSlug; - const isFetching = albums.isFetching || artist.isFetching; - const isPopulated = albums.isPopulated && artist.isPopulated; + const isFetching = books.isFetching || author.isFetching; + const isPopulated = books.isPopulated && author.isPopulated; - // if albums have been fetched, make sure requested one exists + // if books have been fetched, make sure requested one exists // otherwise don't map titleSlug to trigger not found page if (!isFetching && isPopulated) { - const albumIndex = _.findIndex(albums.items, { titleSlug }); - if (albumIndex === -1) { + const bookIndex = _.findIndex(books.items, { titleSlug }); + if (bookIndex === -1) { return { isFetching, isPopulated @@ -44,11 +44,11 @@ function createMapStateToProps() { const mapDispatchToProps = { push, - fetchAlbums, - clearAlbums + fetchBooks, + clearBooks }; -class AlbumDetailsPageConnector extends Component { +class BookDetailsPageConnector extends Component { constructor(props) { super(props); @@ -71,14 +71,14 @@ class AlbumDetailsPageConnector extends Component { populate = () => { const titleSlug = this.props.titleSlug; this.setState({ hasMounted: true }); - this.props.fetchAlbums({ + this.props.fetchBooks({ titleSlug, - includeAllArtistAlbums: true + includeAllAuthorBooks: true }); } unpopulate = () => { - this.props.clearAlbums(); + this.props.clearBooks(); } // @@ -112,7 +112,7 @@ class AlbumDetailsPageConnector extends Component { if (!isFetching && isPopulated && this.state.hasMounted) { return ( - ); @@ -120,14 +120,14 @@ class AlbumDetailsPageConnector extends Component { } } -AlbumDetailsPageConnector.propTypes = { +BookDetailsPageConnector.propTypes = { titleSlug: PropTypes.string, match: PropTypes.shape({ params: PropTypes.shape({ titleSlug: PropTypes.string.isRequired }).isRequired }).isRequired, push: PropTypes.func.isRequired, - fetchAlbums: PropTypes.func.isRequired, - clearAlbums: PropTypes.func.isRequired, + fetchBooks: PropTypes.func.isRequired, + clearBooks: PropTypes.func.isRequired, isFetching: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(AlbumDetailsPageConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(BookDetailsPageConnector); diff --git a/frontend/src/Album/EpisodeNumber.css b/frontend/src/Book/EpisodeNumber.css similarity index 100% rename from frontend/src/Album/EpisodeNumber.css rename to frontend/src/Book/EpisodeNumber.css diff --git a/frontend/src/Album/EpisodeNumber.js b/frontend/src/Book/EpisodeNumber.js similarity index 88% rename from frontend/src/Album/EpisodeNumber.js rename to frontend/src/Book/EpisodeNumber.js index 73e105376..6c9ee881f 100644 --- a/frontend/src/Album/EpisodeNumber.js +++ b/frontend/src/Book/EpisodeNumber.js @@ -15,12 +15,12 @@ function EpisodeNumber(props) { sceneAbsoluteEpisodeNumber, unverifiedSceneNumbering, alternateTitles, - artistType + authorType } = props; const hasSceneInformation = sceneSeasonNumber !== undefined || sceneEpisodeNumber !== undefined || - (artistType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined) || + (authorType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined) || !!alternateTitles.length; return ( @@ -33,7 +33,7 @@ function EpisodeNumber(props) { {episodeNumber} { - artistType === 'anime' && !!absoluteEpisodeNumber && + authorType === 'anime' && !!absoluteEpisodeNumber && ({absoluteEpisodeNumber}) @@ -47,7 +47,7 @@ function EpisodeNumber(props) { sceneEpisodeNumber={sceneEpisodeNumber} sceneAbsoluteEpisodeNumber={sceneAbsoluteEpisodeNumber} alternateTitles={alternateTitles} - artistType={artistType} + authorType={authorType} /> } position={tooltipPositions.RIGHT} @@ -56,7 +56,7 @@ function EpisodeNumber(props) { {episodeNumber} { - artistType === 'anime' && !!absoluteEpisodeNumber && + authorType === 'anime' && !!absoluteEpisodeNumber && ({absoluteEpisodeNumber}) @@ -75,7 +75,7 @@ function EpisodeNumber(props) { } { - artistType === 'anime' && !absoluteEpisodeNumber && + authorType === 'anime' && !absoluteEpisodeNumber &&
); } - if (hasTrackFile) { - const quality = trackFile.quality; - const isCutoffNotMet = trackFile.qualityCutoffNotMet; + if (hasBookFile) { + const quality = bookFile.quality; + const isCutoffNotMet = bookFile.qualityCutoffNotMet; return (
-
); @@ -89,7 +89,7 @@ function EpisodeStatus(props) {
); @@ -100,7 +100,7 @@ function EpisodeStatus(props) {
); @@ -110,7 +110,7 @@ function EpisodeStatus(props) {
); @@ -121,7 +121,7 @@ EpisodeStatus.propTypes = { monitored: PropTypes.bool, grabbed: PropTypes.bool, queueItem: PropTypes.object, - trackFile: PropTypes.object + bookFile: PropTypes.object }; export default EpisodeStatus; diff --git a/frontend/src/Album/EpisodeStatusConnector.js b/frontend/src/Book/EpisodeStatusConnector.js similarity index 71% rename from frontend/src/Album/EpisodeStatusConnector.js rename to frontend/src/Book/EpisodeStatusConnector.js index 2c8efe5c8..73d571735 100644 --- a/frontend/src/Album/EpisodeStatusConnector.js +++ b/frontend/src/Book/EpisodeStatusConnector.js @@ -3,25 +3,25 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createAlbumSelector from 'Store/Selectors/createAlbumSelector'; +import createBookSelector from 'Store/Selectors/createBookSelector'; import createQueueItemSelector from 'Store/Selectors/createQueueItemSelector'; -import createTrackFileSelector from 'Store/Selectors/createTrackFileSelector'; +import createBookFileSelector from 'Store/Selectors/createBookFileSelector'; import EpisodeStatus from './EpisodeStatus'; function createMapStateToProps() { return createSelector( - createAlbumSelector(), + createBookSelector(), createQueueItemSelector(), - createTrackFileSelector(), - (album, queueItem, trackFile) => { - const result = _.pick(album, [ + createBookFileSelector(), + (book, queueItem, bookFile) => { + const result = _.pick(book, [ 'airDateUtc', 'monitored', 'grabbed' ]); result.queueItem = queueItem; - result.trackFile = trackFile; + result.bookFile = bookFile; return result; } @@ -47,7 +47,7 @@ class EpisodeStatusConnector extends Component { EpisodeStatusConnector.propTypes = { bookId: PropTypes.number.isRequired, - trackFileId: PropTypes.number.isRequired + bookFileId: PropTypes.number.isRequired }; export default connect(createMapStateToProps, mapDispatchToProps)(EpisodeStatusConnector); diff --git a/frontend/src/Album/SceneInfo.css b/frontend/src/Book/SceneInfo.css similarity index 100% rename from frontend/src/Album/SceneInfo.css rename to frontend/src/Book/SceneInfo.css diff --git a/frontend/src/Album/SceneInfo.js b/frontend/src/Book/SceneInfo.js similarity index 95% rename from frontend/src/Album/SceneInfo.js rename to frontend/src/Book/SceneInfo.js index ed171248a..48f4a71df 100644 --- a/frontend/src/Album/SceneInfo.js +++ b/frontend/src/Book/SceneInfo.js @@ -10,7 +10,7 @@ function SceneInfo(props) { sceneEpisodeNumber, sceneAbsoluteEpisodeNumber, alternateTitles, - artistType + authorType } = props; return ( @@ -36,7 +36,7 @@ function SceneInfo(props) { } { - artistType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined && + authorType === 'anime' && sceneAbsoluteEpisodeNumber !== undefined && - ); } -AlbumInteractiveSearchModal.propTypes = { +BookInteractiveSearchModal.propTypes = { isOpen: PropTypes.bool.isRequired, bookId: PropTypes.number.isRequired, - albumTitle: PropTypes.string.isRequired, + bookTitle: PropTypes.string.isRequired, onModalClose: PropTypes.func.isRequired }; -export default AlbumInteractiveSearchModal; +export default BookInteractiveSearchModal; diff --git a/frontend/src/Album/Search/AlbumInteractiveSearchModalConnector.js b/frontend/src/Book/Search/BookInteractiveSearchModalConnector.js similarity index 67% rename from frontend/src/Album/Search/AlbumInteractiveSearchModalConnector.js rename to frontend/src/Book/Search/BookInteractiveSearchModalConnector.js index 5b23395fb..7f02d458f 100644 --- a/frontend/src/Album/Search/AlbumInteractiveSearchModalConnector.js +++ b/frontend/src/Book/Search/BookInteractiveSearchModalConnector.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import { cancelFetchReleases, clearReleases } from 'Store/Actions/releaseActions'; -import AlbumInteractiveSearchModal from './AlbumInteractiveSearchModal'; +import BookInteractiveSearchModal from './BookInteractiveSearchModal'; function createMapDispatchToProps(dispatch, props) { return { @@ -12,4 +12,4 @@ function createMapDispatchToProps(dispatch, props) { }; } -export default connect(null, createMapDispatchToProps)(AlbumInteractiveSearchModal); +export default connect(null, createMapDispatchToProps)(BookInteractiveSearchModal); diff --git a/frontend/src/Album/Search/AlbumInteractiveSearchModalContent.js b/frontend/src/Book/Search/BookInteractiveSearchModalContent.js similarity index 77% rename from frontend/src/Album/Search/AlbumInteractiveSearchModalContent.js rename to frontend/src/Book/Search/BookInteractiveSearchModalContent.js index 2ea69efff..ec5094f58 100644 --- a/frontend/src/Album/Search/AlbumInteractiveSearchModalContent.js +++ b/frontend/src/Book/Search/BookInteractiveSearchModalContent.js @@ -8,22 +8,22 @@ import ModalBody from 'Components/Modal/ModalBody'; import ModalFooter from 'Components/Modal/ModalFooter'; import InteractiveSearchConnector from 'InteractiveSearch/InteractiveSearchConnector'; -function AlbumInteractiveSearchModalContent(props) { +function BookInteractiveSearchModalContent(props) { const { bookId, - albumTitle, + bookTitle, onModalClose } = props; return ( - Interactive Search {bookId != null && `- ${albumTitle}`} + Interactive Search {bookId != null && `- ${bookTitle}`} {airDate} ); @@ -17,7 +17,7 @@ function SeasonEpisodeNumber(props) { return ( @@ -26,7 +26,7 @@ function SeasonEpisodeNumber(props) { SeasonEpisodeNumber.propTypes = { airDate: PropTypes.string, - artistType: PropTypes.string + authorType: PropTypes.string }; export default SeasonEpisodeNumber; diff --git a/frontend/src/Album/albumEntities.js b/frontend/src/Book/bookEntities.js similarity index 69% rename from frontend/src/Album/albumEntities.js rename to frontend/src/Book/bookEntities.js index 4f5a26a61..29a0cd63b 100644 --- a/frontend/src/Album/albumEntities.js +++ b/frontend/src/Book/bookEntities.js @@ -1,12 +1,12 @@ export const CALENDAR = 'calendar'; -export const ALBUMS = 'albums'; -export const INTERACTIVE_IMPORT = 'interactiveImport.albums'; +export const BOOKS = 'books'; +export const INTERACTIVE_IMPORT = 'interactiveImport.books'; export const WANTED_CUTOFF_UNMET = 'wanted.cutoffUnmet'; export const WANTED_MISSING = 'wanted.missing'; export default { CALENDAR, - ALBUMS, + BOOKS, INTERACTIVE_IMPORT, WANTED_CUTOFF_UNMET, WANTED_MISSING diff --git a/frontend/src/TrackFile/Editor/TrackFileEditorRow.js b/frontend/src/BookFile/Editor/BookFileEditorRow.js similarity index 82% rename from frontend/src/TrackFile/Editor/TrackFileEditorRow.js rename to frontend/src/BookFile/Editor/BookFileEditorRow.js index 89594f1de..0ef8e627a 100644 --- a/frontend/src/TrackFile/Editor/TrackFileEditorRow.js +++ b/frontend/src/BookFile/Editor/BookFileEditorRow.js @@ -3,9 +3,9 @@ import React from 'react'; import TableRow from 'Components/Table/TableRow'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; -import TrackQuality from 'Album/TrackQuality'; +import BookQuality from 'Book/BookQuality'; -function TrackFileEditorRow(props) { +function BookFileEditorRow(props) { const { id, path, @@ -26,7 +26,7 @@ function TrackFileEditorRow(props) { - @@ -34,7 +34,7 @@ function TrackFileEditorRow(props) { ); } -TrackFileEditorRow.propTypes = { +BookFileEditorRow.propTypes = { id: PropTypes.number.isRequired, path: PropTypes.string.isRequired, quality: PropTypes.object.isRequired, @@ -42,4 +42,4 @@ TrackFileEditorRow.propTypes = { onSelectedChange: PropTypes.func.isRequired }; -export default TrackFileEditorRow; +export default BookFileEditorRow; diff --git a/frontend/src/BookFile/Editor/BookFileEditorTable.js b/frontend/src/BookFile/Editor/BookFileEditorTable.js new file mode 100644 index 000000000..c1b12efe8 --- /dev/null +++ b/frontend/src/BookFile/Editor/BookFileEditorTable.js @@ -0,0 +1,16 @@ +import React from 'react'; +import BookFileEditorTableContentConnector from './BookFileEditorTableContentConnector'; + +function BookFileEditorTable(props) { + const { + ...otherProps + } = props; + + return ( + + ); +} + +export default BookFileEditorTable; diff --git a/frontend/src/TrackFile/Editor/TrackFileEditorTableContent.css b/frontend/src/BookFile/Editor/BookFileEditorTableContent.css similarity index 100% rename from frontend/src/TrackFile/Editor/TrackFileEditorTableContent.css rename to frontend/src/BookFile/Editor/BookFileEditorTableContent.css diff --git a/frontend/src/TrackFile/Editor/TrackFileEditorTableContent.js b/frontend/src/BookFile/Editor/BookFileEditorTableContent.js similarity index 91% rename from frontend/src/TrackFile/Editor/TrackFileEditorTableContent.js rename to frontend/src/BookFile/Editor/BookFileEditorTableContent.js index c1ec18137..985fce54e 100644 --- a/frontend/src/TrackFile/Editor/TrackFileEditorTableContent.js +++ b/frontend/src/BookFile/Editor/BookFileEditorTableContent.js @@ -13,8 +13,8 @@ import SpinnerButton from 'Components/Link/SpinnerButton'; import SelectInput from 'Components/Form/SelectInput'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; -import TrackFileEditorRow from './TrackFileEditorRow'; -import styles from './TrackFileEditorTableContent.css'; +import BookFileEditorRow from './BookFileEditorRow'; +import styles from './BookFileEditorTableContent.css'; const columns = [ { @@ -29,7 +29,7 @@ const columns = [ } ]; -class TrackFileEditorTableContent extends Component { +class BookFileEditorTableContent extends Component { // // Lifecycle @@ -63,8 +63,8 @@ class TrackFileEditorTableContent extends Component { return selectedIds.reduce((acc, id) => { const matchingItem = this.props.items.find((item) => item.id === id); - if (matchingItem && !acc.includes(matchingItem.trackFileId)) { - acc.push(matchingItem.trackFileId); + if (matchingItem && !acc.includes(matchingItem.bookFileId)) { + acc.push(matchingItem.bookFileId); } return acc; @@ -155,7 +155,7 @@ class TrackFileEditorTableContent extends Component { { isPopulated && !items.length ?
- No track files to manage. + No book files to manage.
: null } @@ -173,7 +173,7 @@ class TrackFileEditorTableContent extends Component { { items.map((item) => { return ( - bookId, - (state) => state.trackFiles, + (state) => state.bookFiles, createSchemaSelector(), - createArtistSelector(), + createAuthorSelector(), ( bookId, - trackFiles, + bookFiles, schema, - artist + author ) => { return { ...schema, - items: trackFiles.items, - artistType: artist.artistType, - isDeleting: trackFiles.isDeleting, - isSaving: trackFiles.isSaving + items: bookFiles.items, + authorType: author.authorType, + isDeleting: bookFiles.isDeleting, + isSaving: bookFiles.isSaving }; } ); @@ -58,29 +57,21 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { - dispatchClearTracks() { - dispatch(clearTracks()); - }, - - dispatchFetchTracks(updateProps) { - dispatch(fetchTracks(updateProps)); - }, - dispatchFetchQualityProfileSchema(name, path) { dispatch(fetchQualityProfileSchema()); }, - dispatchUpdateTrackFiles(updateProps) { - dispatch(updateTrackFiles(updateProps)); + dispatchUpdateBookFiles(updateProps) { + dispatch(updateBookFiles(updateProps)); }, - onDeletePress(trackFileIds) { - dispatch(deleteTrackFiles({ trackFileIds })); + onDeletePress(bookFileIds) { + dispatch(deleteBookFiles({ bookFileIds })); } }; } -class TrackFileEditorTableContentConnector extends Component { +class BookFileEditorTableContentConnector extends Component { // // Lifecycle @@ -92,7 +83,7 @@ class TrackFileEditorTableContentConnector extends Component { // // Listeners - onQualityChange = (trackFileIds, qualityId) => { + onQualityChange = (bookFileIds, qualityId) => { const quality = { quality: _.find(this.props.qualities, { id: qualityId }), revision: { @@ -101,7 +92,7 @@ class TrackFileEditorTableContentConnector extends Component { } }; - this.props.dispatchUpdateTrackFiles({ trackFileIds, quality }); + this.props.dispatchUpdateBookFiles({ bookFileIds, quality }); } // @@ -110,14 +101,12 @@ class TrackFileEditorTableContentConnector extends Component { render() { const { dispatchFetchQualityProfileSchema, - dispatchUpdateTrackFiles, - dispatchFetchTracks, - dispatchClearTracks, + dispatchUpdateBookFiles, ...otherProps } = this.props; return ( - @@ -125,14 +114,12 @@ class TrackFileEditorTableContentConnector extends Component { } } -TrackFileEditorTableContentConnector.propTypes = { +BookFileEditorTableContentConnector.propTypes = { authorId: PropTypes.number.isRequired, bookId: PropTypes.number, qualities: PropTypes.arrayOf(PropTypes.object).isRequired, - dispatchFetchTracks: PropTypes.func.isRequired, - dispatchClearTracks: PropTypes.func.isRequired, dispatchFetchQualityProfileSchema: PropTypes.func.isRequired, - dispatchUpdateTrackFiles: PropTypes.func.isRequired + dispatchUpdateBookFiles: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, createMapDispatchToProps)(TrackFileEditorTableContentConnector); +export default connect(createMapStateToProps, createMapDispatchToProps)(BookFileEditorTableContentConnector); diff --git a/frontend/src/TrackFile/ExpandingFileDetails.css b/frontend/src/BookFile/ExpandingFileDetails.css similarity index 100% rename from frontend/src/TrackFile/ExpandingFileDetails.css rename to frontend/src/BookFile/ExpandingFileDetails.css diff --git a/frontend/src/TrackFile/ExpandingFileDetails.js b/frontend/src/BookFile/ExpandingFileDetails.js similarity index 100% rename from frontend/src/TrackFile/ExpandingFileDetails.js rename to frontend/src/BookFile/ExpandingFileDetails.js diff --git a/frontend/src/TrackFile/FileDetails.css b/frontend/src/BookFile/FileDetails.css similarity index 100% rename from frontend/src/TrackFile/FileDetails.css rename to frontend/src/BookFile/FileDetails.css diff --git a/frontend/src/TrackFile/FileDetails.js b/frontend/src/BookFile/FileDetails.js similarity index 90% rename from frontend/src/TrackFile/FileDetails.js rename to frontend/src/BookFile/FileDetails.js index 5e40dbc67..3b4f182b2 100644 --- a/frontend/src/TrackFile/FileDetails.js +++ b/frontend/src/BookFile/FileDetails.js @@ -77,17 +77,17 @@ function FileDetails(props) { /> } { - audioTags.albumTitle !== undefined && + audioTags.bookTitle !== undefined && } { - audioTags.artistTitle !== undefined && + audioTags.authorTitle !== undefined && } { @@ -133,24 +133,24 @@ function FileDetails(props) { /> } { - audioTags.artistMBId !== undefined && + audioTags.authorMBId !== undefined && } { - audioTags.albumMBId !== undefined && + audioTags.bookMBId !== undefined && } diff --git a/frontend/src/TrackFile/FileDetailsConnector.js b/frontend/src/BookFile/FileDetailsConnector.js similarity index 84% rename from frontend/src/TrackFile/FileDetailsConnector.js rename to frontend/src/BookFile/FileDetailsConnector.js index f52dbcacd..2fcf789b7 100644 --- a/frontend/src/TrackFile/FileDetailsConnector.js +++ b/frontend/src/BookFile/FileDetailsConnector.js @@ -4,23 +4,23 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import getErrorMessage from 'Utilities/Object/getErrorMessage'; -import { fetchTrackFiles } from 'Store/Actions/trackFileActions'; +import { fetchBookFiles } from 'Store/Actions/bookFileActions'; import FileDetails from './FileDetails'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; function createMapStateToProps() { return createSelector( - (state) => state.trackFiles, - (trackFiles) => { + (state) => state.bookFiles, + (bookFiles) => { return { - ...trackFiles + ...bookFiles }; } ); } const mapDispatchToProps = { - fetchTrackFiles + fetchBookFiles }; class FileDetailsConnector extends Component { @@ -29,7 +29,7 @@ class FileDetailsConnector extends Component { // Lifecycle componentDidMount() { - this.props.fetchTrackFiles({ id: this.props.id }); + this.props.fetchBookFiles({ id: this.props.id }); } // @@ -67,7 +67,7 @@ class FileDetailsConnector extends Component { } FileDetailsConnector.propTypes = { - fetchTrackFiles: PropTypes.func.isRequired, + fetchBookFiles: PropTypes.func.isRequired, items: PropTypes.arrayOf(PropTypes.object).isRequired, id: PropTypes.number.isRequired, isFetching: PropTypes.bool.isRequired, diff --git a/frontend/src/TrackFile/FileDetailsModal.js b/frontend/src/BookFile/FileDetailsModal.js similarity index 100% rename from frontend/src/TrackFile/FileDetailsModal.js rename to frontend/src/BookFile/FileDetailsModal.js diff --git a/frontend/src/TrackFile/MediaInfo.js b/frontend/src/BookFile/MediaInfo.js similarity index 100% rename from frontend/src/TrackFile/MediaInfo.js rename to frontend/src/BookFile/MediaInfo.js diff --git a/frontend/src/TrackFile/MediaInfoConnector.js b/frontend/src/BookFile/MediaInfoConnector.js similarity index 62% rename from frontend/src/TrackFile/MediaInfoConnector.js rename to frontend/src/BookFile/MediaInfoConnector.js index 5f3a1386b..6b1a98310 100644 --- a/frontend/src/TrackFile/MediaInfoConnector.js +++ b/frontend/src/BookFile/MediaInfoConnector.js @@ -1,15 +1,15 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createTrackFileSelector from 'Store/Selectors/createTrackFileSelector'; +import createBookFileSelector from 'Store/Selectors/createBookFileSelector'; import MediaInfo from './MediaInfo'; function createMapStateToProps() { return createSelector( - createTrackFileSelector(), - (trackFile) => { - if (trackFile) { + createBookFileSelector(), + (bookFile) => { + if (bookFile) { return { - ...trackFile.mediaInfo + ...bookFile.mediaInfo }; } diff --git a/frontend/src/TrackFile/mediaInfoTypes.js b/frontend/src/BookFile/mediaInfoTypes.js similarity index 100% rename from frontend/src/TrackFile/mediaInfoTypes.js rename to frontend/src/BookFile/mediaInfoTypes.js diff --git a/frontend/src/AlbumStudio/AlbumStudio.css b/frontend/src/Bookshelf/Bookshelf.css similarity index 100% rename from frontend/src/AlbumStudio/AlbumStudio.css rename to frontend/src/Bookshelf/Bookshelf.css diff --git a/frontend/src/AlbumStudio/AlbumStudio.js b/frontend/src/Bookshelf/Bookshelf.js similarity index 88% rename from frontend/src/AlbumStudio/AlbumStudio.js rename to frontend/src/Bookshelf/Bookshelf.js index a6dc8ee1e..a72d30688 100644 --- a/frontend/src/AlbumStudio/AlbumStudio.js +++ b/frontend/src/Bookshelf/Bookshelf.js @@ -17,12 +17,12 @@ import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import FilterMenu from 'Components/Menu/FilterMenu'; import VirtualTable from 'Components/Table/VirtualTable'; import VirtualTableRow from 'Components/Table/VirtualTableRow'; -import NoArtist from 'Artist/NoArtist'; -import AlbumStudioFilterModalConnector from './AlbumStudioFilterModalConnector'; -import AlbumStudioRowConnector from './AlbumStudioRowConnector'; -import AlbumStudioTableHeader from './AlbumStudioTableHeader'; -import AlbumStudioFooter from './AlbumStudioFooter'; -import styles from './AlbumStudio.css'; +import NoAuthor from 'Author/NoAuthor'; +import BookStudioFilterModalConnector from './BookshelfFilterModalConnector'; +import BookStudioRowConnector from './BookshelfRowConnector'; +import BookshelfTableHeader from './BookshelfTableHeader'; +import BookshelfFooter from './BookshelfFooter'; +import styles from './Bookshelf.css'; const columns = [ { @@ -40,14 +40,14 @@ const columns = [ isVisible: true }, { - name: 'albumCount', + name: 'bookCount', label: 'Books', isSortable: false, isVisible: true } ]; -class AlbumStudio extends Component { +class Bookshelf extends Component { // // Lifecycle @@ -183,13 +183,13 @@ class AlbumStudio extends Component { const newSelectedState = {}; - items.forEach((artist) => { - const isItemSelected = selectedState[artist.id]; + items.forEach((author) => { + const isItemSelected = selectedState[author.id]; if (isItemSelected) { - newSelectedState[artist.id] = isItemSelected; + newSelectedState[author.id] = isItemSelected; } else { - newSelectedState[artist.id] = false; + newSelectedState[author.id] = false; } }); @@ -209,22 +209,22 @@ class AlbumStudio extends Component { estimateRowHeight = (width) => { const { - albumCount, + bookCount, items } = this.props; - if (albumCount === undefined || albumCount === 0 || items.length === 0) { + if (bookCount === undefined || bookCount === 0 || items.length === 0) { return 100; } - // guess 250px per album entry + // guess 250px per book entry // available width is total width less 186px for select, status etc const cols = Math.max(Math.floor((width - 186) / 250), 1); - const albumsPerArtist = albumCount / items.length; - const albumRowsPerArtist = albumsPerArtist / cols; + const booksPerAuthor = bookCount / items.length; + const bookRowsPerAuthor = booksPerAuthor / cols; - // each row is 23px per album row plus 16px padding - return albumRowsPerArtist * 23 + 16; + // each row is 23px per book row plus 16px padding + return bookRowsPerAuthor * 23 + 16; } rowRenderer = ({ key, rowIndex, parent, style }) => { @@ -251,7 +251,7 @@ class AlbumStudio extends Component { ref={registerChild} style={style} > - + @@ -356,7 +356,7 @@ class AlbumStudio extends Component { selectedFilterKey={selectedFilterKey} filters={filters} customFilters={customFilters} - filterModalConnectorComponent={AlbumStudioFilterModalConnector} + filterModalConnectorComponent={BookStudioFilterModalConnector} onFilterSelect={onFilterSelect} /> @@ -375,7 +375,7 @@ class AlbumStudio extends Component { { !isFetching && !!error && -
{getErrorMessage(error, 'Failed to load artist from API')}
+
{getErrorMessage(error, 'Failed to load author from API')}
} { @@ -390,7 +390,7 @@ class AlbumStudio extends Component { overscanRowCount={5} rowRenderer={this.rowRenderer} header={ - + } @@ -425,7 +425,7 @@ class AlbumStudio extends Component { }
- { + onBookMonitoredPress = () => { const { id, monitored } = this.props; - this.props.onAlbumMonitoredPress(id, !monitored); + this.props.onBookMonitoredPress(id, !monitored); } // @@ -31,18 +31,18 @@ class AlbumStudioAlbum extends Component { } = this.props; const { - trackFileCount, - totalTrackCount, - percentOfTracks + bookFileCount, + totalBookCount, + percentOfBooks } = statistics; return ( -
+
@@ -54,14 +54,14 @@ class AlbumStudioAlbum extends Component {
{ - totalTrackCount === 0 ? '0/0' : `${trackFileCount}/${totalTrackCount}` + totalBookCount === 0 ? '0/0' : `${bookFileCount}/${totalBookCount}` }
@@ -69,23 +69,23 @@ class AlbumStudioAlbum extends Component { } } -AlbumStudioAlbum.propTypes = { +BookshelfBook.propTypes = { id: PropTypes.number.isRequired, title: PropTypes.string.isRequired, disambiguation: PropTypes.string, monitored: PropTypes.bool.isRequired, statistics: PropTypes.object.isRequired, isSaving: PropTypes.bool.isRequired, - onAlbumMonitoredPress: PropTypes.func.isRequired + onBookMonitoredPress: PropTypes.func.isRequired }; -AlbumStudioAlbum.defaultProps = { +BookshelfBook.defaultProps = { isSaving: false, statistics: { - trackFileCount: 0, - totalTrackCount: 0, - percentOfTracks: 0 + bookFileCount: 0, + totalBookCount: 0, + percentOfBooks: 0 } }; -export default AlbumStudioAlbum; +export default BookshelfBook; diff --git a/frontend/src/Bookshelf/BookshelfConnector.js b/frontend/src/Bookshelf/BookshelfConnector.js new file mode 100644 index 000000000..ada8a6262 --- /dev/null +++ b/frontend/src/Bookshelf/BookshelfConnector.js @@ -0,0 +1,116 @@ +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { createSelector } from 'reselect'; +import createAuthorClientSideCollectionItemsSelector from 'Store/Selectors/createAuthorClientSideCollectionItemsSelector'; +import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; +import { setBookshelfSort, setBookshelfFilter, saveBookshelf } from 'Store/Actions/bookshelfActions'; +import { fetchBooks, clearBooks } from 'Store/Actions/bookActions'; +import Bookshelf from './Bookshelf'; + +function createBookFetchStateSelector() { + return createSelector( + (state) => state.books.items.length, + (state) => state.books.isFetching, + (state) => state.books.isPopulated, + (length, isFetching, isPopulated) => { + const bookCount = (!isFetching && isPopulated) ? length : 0; + return { + bookCount, + isFetching, + isPopulated + }; + } + ); +} + +function createMapStateToProps() { + return createSelector( + createBookFetchStateSelector(), + createAuthorClientSideCollectionItemsSelector('bookshelf'), + createDimensionsSelector(), + (books, author, dimensionsState) => { + const isPopulated = books.isPopulated && author.isPopulated; + const isFetching = author.isFetching || books.isFetching; + return { + ...author, + isPopulated, + isFetching, + bookCount: books.bookCount, + isSmallScreen: dimensionsState.isSmallScreen + }; + } + ); +} + +const mapDispatchToProps = { + fetchBooks, + clearBooks, + setBookshelfSort, + setBookshelfFilter, + saveBookshelf +}; + +class BookshelfConnector extends Component { + + // + // Lifecycle + + componentDidMount() { + this.populate(); + } + + componentWillUnmount() { + this.unpopulate(); + } + + // + // Control + + populate = () => { + this.props.fetchBooks(); + } + + unpopulate = () => { + this.props.clearBooks(); + } + + // + // Listeners + + onSortPress = (sortKey) => { + this.props.setBookshelfSort({ sortKey }); + } + + onFilterSelect = (selectedFilterKey) => { + this.props.setBookshelfFilter({ selectedFilterKey }); + } + + onUpdateSelectedPress = (payload) => { + this.props.saveBookshelf(payload); + } + + // + // Render + + render() { + return ( + + ); + } +} + +BookshelfConnector.propTypes = { + setBookshelfSort: PropTypes.func.isRequired, + setBookshelfFilter: PropTypes.func.isRequired, + fetchBooks: PropTypes.func.isRequired, + clearBooks: PropTypes.func.isRequired, + saveBookshelf: PropTypes.func.isRequired +}; + +export default connect(createMapStateToProps, mapDispatchToProps)(BookshelfConnector); diff --git a/frontend/src/AlbumStudio/AlbumStudioFilterModalConnector.js b/frontend/src/Bookshelf/BookshelfFilterModalConnector.js similarity index 64% rename from frontend/src/AlbumStudio/AlbumStudioFilterModalConnector.js rename to frontend/src/Bookshelf/BookshelfFilterModalConnector.js index 655601cca..2c8e1ce86 100644 --- a/frontend/src/AlbumStudio/AlbumStudioFilterModalConnector.js +++ b/frontend/src/Bookshelf/BookshelfFilterModalConnector.js @@ -1,24 +1,24 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { setAlbumStudioFilter } from 'Store/Actions/albumStudioActions'; +import { setBookshelfFilter } from 'Store/Actions/bookshelfActions'; import FilterModal from 'Components/Filter/FilterModal'; function createMapStateToProps() { return createSelector( - (state) => state.artist.items, - (state) => state.albumStudio.filterBuilderProps, + (state) => state.authors.items, + (state) => state.bookshelf.filterBuilderProps, (sectionItems, filterBuilderProps) => { return { sectionItems, filterBuilderProps, - customFilterType: 'albumStudio' + customFilterType: 'bookshelf' }; } ); } const mapDispatchToProps = { - dispatchSetFilter: setAlbumStudioFilter + dispatchSetFilter: setBookshelfFilter }; export default connect(createMapStateToProps, mapDispatchToProps)(FilterModal); diff --git a/frontend/src/AlbumStudio/AlbumStudioFooter.css b/frontend/src/Bookshelf/BookshelfFooter.css similarity index 100% rename from frontend/src/AlbumStudio/AlbumStudioFooter.css rename to frontend/src/Bookshelf/BookshelfFooter.css diff --git a/frontend/src/AlbumStudio/AlbumStudioFooter.js b/frontend/src/Bookshelf/BookshelfFooter.js similarity index 91% rename from frontend/src/AlbumStudio/AlbumStudioFooter.js rename to frontend/src/Bookshelf/BookshelfFooter.js index 768a6914c..aca50003d 100644 --- a/frontend/src/AlbumStudio/AlbumStudioFooter.js +++ b/frontend/src/Bookshelf/BookshelfFooter.js @@ -2,14 +2,14 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { kinds } from 'Helpers/Props'; import SpinnerButton from 'Components/Link/SpinnerButton'; -import MonitorAlbumsSelectInput from 'Components/Form/MonitorAlbumsSelectInput'; +import MonitorBooksSelectInput from 'Components/Form/MonitorBooksSelectInput'; import SelectInput from 'Components/Form/SelectInput'; import PageContentFooter from 'Components/Page/PageContentFooter'; -import styles from './AlbumStudioFooter.css'; +import styles from './BookshelfFooter.css'; const NO_CHANGE = 'noChange'; -class AlbumStudioFooter extends Component { +class BookshelfFooter extends Component { // // Lifecycle @@ -106,7 +106,7 @@ class AlbumStudioFooter extends Component { Monitor Books
- - - + { - albums.map((album) => { + books.map((book) => { return ( - ); }) @@ -81,22 +81,22 @@ class AlbumStudioRow extends Component { } } -AlbumStudioRow.propTypes = { +BookshelfRow.propTypes = { authorId: PropTypes.number.isRequired, status: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, - artistName: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, monitored: PropTypes.bool.isRequired, - albums: PropTypes.arrayOf(PropTypes.object).isRequired, + books: PropTypes.arrayOf(PropTypes.object).isRequired, isSaving: PropTypes.bool.isRequired, isSelected: PropTypes.bool, onSelectedChange: PropTypes.func.isRequired, - onArtistMonitoredPress: PropTypes.func.isRequired, - onAlbumMonitoredPress: PropTypes.func.isRequired + onAuthorMonitoredPress: PropTypes.func.isRequired, + onBookMonitoredPress: PropTypes.func.isRequired }; -AlbumStudioRow.defaultProps = { +BookshelfRow.defaultProps = { isSaving: false }; -export default AlbumStudioRow; +export default BookshelfRow; diff --git a/frontend/src/Bookshelf/BookshelfRowConnector.js b/frontend/src/Bookshelf/BookshelfRowConnector.js new file mode 100644 index 000000000..eb590d6d7 --- /dev/null +++ b/frontend/src/Bookshelf/BookshelfRowConnector.js @@ -0,0 +1,94 @@ +import _ from 'lodash'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { createSelector } from 'reselect'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; +import { toggleAuthorMonitored } from 'Store/Actions/authorActions'; +import { toggleBooksMonitored } from 'Store/Actions/bookActions'; +import BookshelfRow from './BookshelfRow'; + +// Use a const to share the reselect cache between instances +const getBookMap = createSelector( + (state) => state.books.items, + (books) => { + return books.reduce((acc, curr) => { + (acc[curr.authorId] = acc[curr.authorId] || []).push(curr); + return acc; + }, {}); + } +); + +function createMapStateToProps() { + return createSelector( + createAuthorSelector(), + getBookMap, + (author, bookMap) => { + const booksInAuthor = bookMap.hasOwnProperty(author.id) ? bookMap[author.id] : []; + const sortedBooks = _.orderBy(booksInAuthor, 'releaseDate', 'desc'); + + return { + ...author, + authorId: author.id, + authorName: author.authorName, + monitored: author.monitored, + status: author.status, + isSaving: author.isSaving, + books: sortedBooks + }; + } + ); +} + +const mapDispatchToProps = { + toggleAuthorMonitored, + toggleBooksMonitored +}; + +class BookshelfRowConnector extends Component { + + // + // Listeners + + onAuthorMonitoredPress = () => { + const { + authorId, + monitored + } = this.props; + + this.props.toggleAuthorMonitored({ + authorId, + monitored: !monitored + }); + } + + onBookMonitoredPress = (bookId, monitored) => { + const bookIds = [bookId]; + this.props.toggleBooksMonitored({ + bookIds, + monitored + }); + } + + // + // Render + + render() { + return ( + + ); + } +} + +BookshelfRowConnector.propTypes = { + authorId: PropTypes.number.isRequired, + monitored: PropTypes.bool.isRequired, + toggleAuthorMonitored: PropTypes.func.isRequired, + toggleBooksMonitored: PropTypes.func.isRequired +}; + +export default connect(createMapStateToProps, mapDispatchToProps)(BookshelfRowConnector); diff --git a/frontend/src/AlbumStudio/AlbumStudioTableHeader.css b/frontend/src/Bookshelf/BookshelfTableHeader.css similarity index 96% rename from frontend/src/AlbumStudio/AlbumStudioTableHeader.css rename to frontend/src/Bookshelf/BookshelfTableHeader.css index 14391dc93..55fa0c210 100644 --- a/frontend/src/AlbumStudio/AlbumStudioTableHeader.css +++ b/frontend/src/Bookshelf/BookshelfTableHeader.css @@ -12,7 +12,7 @@ flex: 0 0 110px; } -.albumCount { +.bookCount { composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; padding: 12px; diff --git a/frontend/src/AlbumStudio/AlbumStudioTableHeader.js b/frontend/src/Bookshelf/BookshelfTableHeader.js similarity index 89% rename from frontend/src/AlbumStudio/AlbumStudioTableHeader.js rename to frontend/src/Bookshelf/BookshelfTableHeader.js index 88b934c5b..4e17e8985 100644 --- a/frontend/src/AlbumStudio/AlbumStudioTableHeader.js +++ b/frontend/src/Bookshelf/BookshelfTableHeader.js @@ -3,9 +3,9 @@ import React from 'react'; import VirtualTableHeader from 'Components/Table/VirtualTableHeader'; import VirtualTableHeaderCell from 'Components/Table/VirtualTableHeaderCell'; import VirtualTableSelectAllHeaderCell from 'Components/Table/VirtualTableSelectAllHeaderCell'; -import styles from './AlbumStudioTableHeader.css'; +import styles from './BookshelfTableHeader.css'; -function AlbumStudioTableHeader(props) { +function BookshelfTableHeader(props) { const { columns, allSelected, @@ -51,11 +51,11 @@ function AlbumStudioTableHeader(props) { ); } -AlbumStudioTableHeader.propTypes = { +BookshelfTableHeader.propTypes = { columns: PropTypes.arrayOf(PropTypes.object).isRequired, allSelected: PropTypes.bool.isRequired, allUnselected: PropTypes.bool.isRequired, onSelectAllChange: PropTypes.func.isRequired }; -export default AlbumStudioTableHeader; +export default BookshelfTableHeader; diff --git a/frontend/src/Calendar/Agenda/AgendaEvent.css b/frontend/src/Calendar/Agenda/AgendaEvent.css index 876c9fc75..24c69ab6f 100644 --- a/frontend/src/Calendar/Agenda/AgendaEvent.css +++ b/frontend/src/Calendar/Agenda/AgendaEvent.css @@ -30,15 +30,15 @@ border: none !important; } -.artistName, -.albumTitle { +.authorName, +.bookTitle { @add-mixin truncate; flex: 0 1 300px; margin-right: 10px; } -.albumTitle { +.bookTitle { flex: 1 1 1px; } @@ -46,7 +46,7 @@ flex: 0 0 100px; } -.albumSeparator { +.bookSeparator { display: none; } @@ -98,7 +98,7 @@ .date, .time, - .artistName { + .authorName { flex: 0 0 100%; } @@ -106,7 +106,7 @@ flex: 0 0 auto; } - .albumSeparator { + .bookSeparator { display: inline-block; margin: 0 5px; } diff --git a/frontend/src/Calendar/Agenda/AgendaEvent.js b/frontend/src/Calendar/Agenda/AgendaEvent.js index 316ff3d59..a2dcaf395 100644 --- a/frontend/src/Calendar/Agenda/AgendaEvent.js +++ b/frontend/src/Calendar/Agenda/AgendaEvent.js @@ -39,7 +39,7 @@ class AgendaEvent extends Component { render() { const { id, - artist, + author, title, titleSlug, releaseDate, @@ -54,10 +54,10 @@ class AgendaEvent extends Component { } = this.props; const startTime = moment(releaseDate); - // const endTime = startTime.add(artist.runtime, 'minutes'); + // const endTime = startTime.add(author.runtime, 'minutes'); const downloading = !!(queueItem || grabbed); - const isMonitored = artist.monitored && monitored; - const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored, statistics.percentOfTracks); + const isMonitored = author.monitored && monitored; + const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored, statistics.percentOfBooks); return (
@@ -85,15 +85,15 @@ class AgendaEvent extends Component { {formatTime(releaseDate, timeFormat)}
-
- - {artist.artistName} +
+ + {author.authorName}
-
-
+
-
-
+
{title} @@ -110,7 +110,7 @@ class AgendaEvent extends Component { !queueItem && grabbed && } @@ -121,10 +121,10 @@ class AgendaEvent extends Component { AgendaEvent.propTypes = { id: PropTypes.number.isRequired, - artist: PropTypes.object.isRequired, + author: PropTypes.object.isRequired, title: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, - albumType: PropTypes.string.isRequired, + bookType: PropTypes.string.isRequired, releaseDate: PropTypes.string.isRequired, monitored: PropTypes.bool.isRequired, statistics: PropTypes.object.isRequired, @@ -138,7 +138,7 @@ AgendaEvent.propTypes = { AgendaEvent.defaultProps = { statistics: { - percentOfTracks: 0 + percentOfBooks: 0 } }; diff --git a/frontend/src/Calendar/Agenda/AgendaEventConnector.js b/frontend/src/Calendar/Agenda/AgendaEventConnector.js index b0ab00f1b..cc8137869 100644 --- a/frontend/src/Calendar/Agenda/AgendaEventConnector.js +++ b/frontend/src/Calendar/Agenda/AgendaEventConnector.js @@ -1,18 +1,18 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createQueueItemSelector from 'Store/Selectors/createQueueItemSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import AgendaEvent from './AgendaEvent'; function createMapStateToProps() { return createSelector( - createArtistSelector(), + createAuthorSelector(), createQueueItemSelector(), createUISettingsSelector(), - (artist, queueItem, uiSettings) => { + (author, queueItem, uiSettings) => { return { - artist, + author, queueItem, timeFormat: uiSettings.timeFormat, longDateFormat: uiSettings.longDateFormat, diff --git a/frontend/src/Calendar/CalendarConnector.js b/frontend/src/Calendar/CalendarConnector.js index 41156bb7a..824b9f028 100644 --- a/frontend/src/Calendar/CalendarConnector.js +++ b/frontend/src/Calendar/CalendarConnector.js @@ -6,7 +6,7 @@ import { registerPagePopulator, unregisterPagePopulator } from 'Utilities/pagePo import hasDifferentItems from 'Utilities/Object/hasDifferentItems'; import selectUniqueIds from 'Utilities/Object/selectUniqueIds'; import * as calendarActions from 'Store/Actions/calendarActions'; -import { fetchTrackFiles, clearTrackFiles } from 'Store/Actions/trackFileActions'; +import { fetchBookFiles, clearBookFiles } from 'Store/Actions/bookFileActions'; import { fetchQueueDetails, clearQueueDetails } from 'Store/Actions/queueActions'; import Calendar from './Calendar'; @@ -23,8 +23,8 @@ function createMapStateToProps() { const mapDispatchToProps = { ...calendarActions, - fetchTrackFiles, - clearTrackFiles, + fetchBookFiles, + clearBookFiles, fetchQueueDetails, clearQueueDetails }; @@ -66,14 +66,14 @@ class CalendarConnector extends Component { if (hasDifferentItems(prevProps.items, items)) { const bookIds = selectUniqueIds(items, 'id'); - // const trackFileIds = selectUniqueIds(items, 'trackFileId'); + // const bookFileIds = selectUniqueIds(items, 'bookFileId'); if (items.length) { this.props.fetchQueueDetails({ bookIds }); } - // if (trackFileIds.length) { - // this.props.fetchTrackFiles({ trackFileIds }); + // if (bookFileIds.length) { + // this.props.fetchBookFiles({ bookFileIds }); // } } @@ -86,7 +86,7 @@ class CalendarConnector extends Component { unregisterPagePopulator(this.repopulate); this.props.clearCalendar(); this.props.clearQueueDetails(); - this.props.clearTrackFiles(); + this.props.clearBookFiles(); this.clearUpdateTimeout(); } @@ -165,8 +165,8 @@ CalendarConnector.propTypes = { gotoCalendarNextRange: PropTypes.func.isRequired, clearCalendar: PropTypes.func.isRequired, fetchCalendar: PropTypes.func.isRequired, - fetchTrackFiles: PropTypes.func.isRequired, - clearTrackFiles: PropTypes.func.isRequired, + fetchBookFiles: PropTypes.func.isRequired, + clearBookFiles: PropTypes.func.isRequired, fetchQueueDetails: PropTypes.func.isRequired, clearQueueDetails: PropTypes.func.isRequired }; diff --git a/frontend/src/Calendar/CalendarPage.js b/frontend/src/Calendar/CalendarPage.js index cd2e24462..698b2a47f 100644 --- a/frontend/src/Calendar/CalendarPage.js +++ b/frontend/src/Calendar/CalendarPage.js @@ -9,7 +9,7 @@ import PageToolbar from 'Components/Page/Toolbar/PageToolbar'; import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection'; import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton'; import FilterMenu from 'Components/Menu/FilterMenu'; -import NoArtist from 'Artist/NoArtist'; +import NoAuthor from 'Author/NoAuthor'; import CalendarLinkModal from './iCal/CalendarLinkModal'; import CalendarOptionsModal from './Options/CalendarOptionsModal'; import LegendConnector from './Legend/LegendConnector'; @@ -75,8 +75,8 @@ class CalendarPage extends Component { const { selectedFilterKey, filters, - hasArtist, - artistError, + hasAuthor, + authorError, missingBookIds, isSearchingForMissing, useCurrentPage, @@ -90,7 +90,7 @@ class CalendarPage extends Component { const isMeasured = this.state.width > 0; - const PageComponent = hasArtist ? CalendarConnector : NoArtist; + const PageComponent = hasAuthor ? CalendarConnector : NoAuthor; return ( @@ -120,7 +120,7 @@ class CalendarPage extends Component { { - artistError && + authorError &&
- {getErrorMessage(artistError, 'Failed to load artist from API')} + {getErrorMessage(authorError, 'Failed to load author from API')}
} { - !artistError && + !authorError && } @@ -180,8 +180,8 @@ class CalendarPage extends Component { CalendarPage.propTypes = { selectedFilterKey: PropTypes.string.isRequired, filters: PropTypes.arrayOf(PropTypes.object).isRequired, - hasArtist: PropTypes.bool.isRequired, - artistError: PropTypes.object, + hasAuthor: PropTypes.bool.isRequired, + authorError: PropTypes.object, missingBookIds: PropTypes.arrayOf(PropTypes.number).isRequired, isSearchingForMissing: PropTypes.bool.isRequired, useCurrentPage: PropTypes.bool.isRequired, diff --git a/frontend/src/Calendar/CalendarPageConnector.js b/frontend/src/Calendar/CalendarPageConnector.js index 19affd45b..3d3e26f96 100644 --- a/frontend/src/Calendar/CalendarPageConnector.js +++ b/frontend/src/Calendar/CalendarPageConnector.js @@ -5,7 +5,7 @@ import { isCommandExecuting } from 'Utilities/Command'; import isBefore from 'Utilities/Date/isBefore'; import withCurrentPage from 'Components/withCurrentPage'; import { searchMissing, setCalendarDaysCount, setCalendarFilter } from 'Store/Actions/calendarActions'; -import createArtistCountSelector from 'Store/Selectors/createArtistCountSelector'; +import createAuthorCountSelector from 'Store/Selectors/createAuthorCountSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import createCommandsSelector from 'Store/Selectors/createCommandsSelector'; import CalendarPage from './CalendarPage'; @@ -16,18 +16,18 @@ function createMissingBookIdsSelector() { (state) => state.calendar.end, (state) => state.calendar.items, (state) => state.queue.details.items, - (start, end, albums, queueDetails) => { - return albums.reduce((acc, album) => { - const releaseDate = album.releaseDate; + (start, end, books, queueDetails) => { + return books.reduce((acc, book) => { + const releaseDate = book.releaseDate; if ( - album.percentOfTracks < 100 && + book.percentOfBooks < 100 && moment(releaseDate).isAfter(start) && moment(releaseDate).isBefore(end) && - isBefore(album.releaseDate) && - !queueDetails.some((details) => !!details.album && details.album.id === album.id) + isBefore(book.releaseDate) && + !queueDetails.some((details) => !!details.book && details.book.id === book.id) ) { - acc.push(album.id); + acc.push(book.id); } return acc; @@ -56,14 +56,14 @@ function createMapStateToProps() { return createSelector( (state) => state.calendar.selectedFilterKey, (state) => state.calendar.filters, - createArtistCountSelector(), + createAuthorCountSelector(), createUISettingsSelector(), createMissingBookIdsSelector(), createIsSearchingSelector(), ( selectedFilterKey, filters, - artistCount, + authorCount, uiSettings, missingBookIds, isSearchingForMissing @@ -72,8 +72,8 @@ function createMapStateToProps() { selectedFilterKey, filters, colorImpairedMode: uiSettings.enableColorImpairedMode, - hasArtist: !!artistCount.count, - artistError: artistCount.error, + hasAuthor: !!authorCount.count, + authorError: authorCount.error, missingBookIds, isSearchingForMissing }; diff --git a/frontend/src/Calendar/Events/CalendarEvent.css b/frontend/src/Calendar/Events/CalendarEvent.css index 055d51882..c4e6a3145 100644 --- a/frontend/src/Calendar/Events/CalendarEvent.css +++ b/frontend/src/Calendar/Events/CalendarEvent.css @@ -12,19 +12,19 @@ } .info, -.albumInfo { +.bookInfo { display: flex; } -.artistName, -.albumTitle { +.authorName, +.bookTitle { @add-mixin truncate; flex: 1 0 1px; margin-right: 10px; } -.artistName { +.authorName { color: #3a3f51; font-size: $defaultFontSize; } diff --git a/frontend/src/Calendar/Events/CalendarEvent.js b/frontend/src/Calendar/Events/CalendarEvent.js index f5584caf7..c48f6d1d3 100644 --- a/frontend/src/Calendar/Events/CalendarEvent.js +++ b/frontend/src/Calendar/Events/CalendarEvent.js @@ -43,7 +43,7 @@ class CalendarEvent extends Component { render() { const { id, - artist, + author, title, titleSlug, releaseDate, @@ -55,15 +55,15 @@ class CalendarEvent extends Component { colorImpairedMode } = this.props; - if (!artist) { + if (!author) { return null; } const startTime = moment(releaseDate); - // const endTime = startTime.add(artist.runtime, 'minutes'); + // const endTime = startTime.add(author.runtime, 'minutes'); const downloading = !!(queueItem || grabbed); - const isMonitored = artist.monitored && monitored; - const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored, statistics.percentOfTracks); + const isMonitored = author.monitored && monitored; + const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored, statistics.percentOfBooks); return (
@@ -77,9 +77,9 @@ class CalendarEvent extends Component { onPress={this.onPress} >
-
- - {artist.artistName} +
+ + {author.authorName}
@@ -97,13 +97,13 @@ class CalendarEvent extends Component { }
-
-
+
+
{title} @@ -117,7 +117,7 @@ class CalendarEvent extends Component { CalendarEvent.propTypes = { id: PropTypes.number.isRequired, - artist: PropTypes.object.isRequired, + author: PropTypes.object.isRequired, title: PropTypes.string.isRequired, titleSlug: PropTypes.string.isRequired, statistics: PropTypes.object.isRequired, @@ -132,7 +132,7 @@ CalendarEvent.propTypes = { CalendarEvent.defaultProps = { statistics: { - percentOfTracks: 0 + percentOfBooks: 0 } }; diff --git a/frontend/src/Calendar/Events/CalendarEventConnector.js b/frontend/src/Calendar/Events/CalendarEventConnector.js index 31706e2f7..65a32c6bc 100644 --- a/frontend/src/Calendar/Events/CalendarEventConnector.js +++ b/frontend/src/Calendar/Events/CalendarEventConnector.js @@ -1,18 +1,18 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import createQueueItemSelector from 'Store/Selectors/createQueueItemSelector'; import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector'; import CalendarEvent from './CalendarEvent'; function createMapStateToProps() { return createSelector( - createArtistSelector(), + createAuthorSelector(), createQueueItemSelector(), createUISettingsSelector(), - (artist, queueItem, uiSettings) => { + (author, queueItem, uiSettings) => { return { - artist, + author, queueItem, timeFormat: uiSettings.timeFormat, colorImpairedMode: uiSettings.enableColorImpairedMode diff --git a/frontend/src/Calendar/Events/CalendarEventQueueDetails.js b/frontend/src/Calendar/Events/CalendarEventQueueDetails.js index 1b603fd50..15631764b 100644 --- a/frontend/src/Calendar/Events/CalendarEventQueueDetails.js +++ b/frontend/src/Calendar/Events/CalendarEventQueueDetails.js @@ -25,7 +25,7 @@ function CalendarEventQueueDetails(props) { status={status} errorMessage={errorMessage} progressBar={ -
+
@@ -43,13 +43,13 @@ function Legend(props) {
@@ -57,13 +57,13 @@ function Legend(props) {
diff --git a/frontend/src/Calendar/Options/CalendarOptionsModalContent.js b/frontend/src/Calendar/Options/CalendarOptionsModalContent.js index a25d36f9c..1140fd8f7 100644 --- a/frontend/src/Calendar/Options/CalendarOptionsModalContent.js +++ b/frontend/src/Calendar/Options/CalendarOptionsModalContent.js @@ -91,7 +91,7 @@ class CalendarOptionsModalContent extends Component { render() { const { - collapseMultipleAlbums, + collapseMultipleBooks, showCutoffUnmetIcon, onModalClose } = this.props; @@ -113,13 +113,13 @@ class CalendarOptionsModalContent extends Component {
- Collapse Multiple Albums + Collapse Multiple Books @@ -202,7 +202,7 @@ class CalendarOptionsModalContent extends Component { } CalendarOptionsModalContent.propTypes = { - collapseMultipleAlbums: PropTypes.bool.isRequired, + collapseMultipleBooks: PropTypes.bool.isRequired, showCutoffUnmetIcon: PropTypes.bool.isRequired, firstDayOfWeek: PropTypes.number.isRequired, calendarWeekColumnHeader: PropTypes.string.isRequired, diff --git a/frontend/src/Calendar/getStatusStyle.js b/frontend/src/Calendar/getStatusStyle.js index c02ae0ee5..89e62e9a8 100644 --- a/frontend/src/Calendar/getStatusStyle.js +++ b/frontend/src/Calendar/getStatusStyle.js @@ -1,14 +1,14 @@ /* eslint max-params: 0 */ import moment from 'moment'; -function getStatusStyle(episodeNumber, downloading, startTime, isMonitored, percentOfTracks) { +function getStatusStyle(episodeNumber, downloading, startTime, isMonitored, percentOfBooks) { const currentTime = moment(); - if (percentOfTracks === 100) { + if (percentOfBooks === 100) { return 'downloaded'; } - if (percentOfTracks > 0) { + if (percentOfBooks > 0) { return 'partial'; } diff --git a/frontend/src/Calendar/iCal/CalendarLinkModalContent.js b/frontend/src/Calendar/iCal/CalendarLinkModalContent.js index 522b78fb1..0474a59e7 100644 --- a/frontend/src/Calendar/iCal/CalendarLinkModalContent.js +++ b/frontend/src/Calendar/iCal/CalendarLinkModalContent.js @@ -119,7 +119,7 @@ class CalendarLinkModalContent extends Component { type={inputTypes.CHECK} name="unmonitored" value={unmonitored} - helpText="Include unmonitored albums in the iCal feed" + helpText="Include unmonitored books in the iCal feed" onChange={this.onInputChange} /> @@ -155,7 +155,7 @@ class CalendarLinkModalContent extends Component { type={inputTypes.TAG} name="tags" value={tags} - helpText="Feed will only contain artists with at least one matching tag" + helpText="Feed will only contain authors with at least one matching tag" onChange={this.onInputChange} /> diff --git a/frontend/src/Commands/commandNames.js b/frontend/src/Commands/commandNames.js index 475d16a64..ddbdcbc62 100644 --- a/frontend/src/Commands/commandNames.js +++ b/frontend/src/Commands/commandNames.js @@ -3,21 +3,21 @@ export const BACKUP = 'Backup'; export const REFRESH_MONITORED_DOWNLOADS = 'RefreshMonitoredDownloads'; export const CLEAR_BLACKLIST = 'ClearBlacklist'; export const CLEAR_LOGS = 'ClearLog'; -export const CUTOFF_UNMET_ALBUM_SEARCH = 'CutoffUnmetBookSearch'; +export const CUTOFF_UNMET_BOOK_SEARCH = 'CutoffUnmetBookSearch'; export const DELETE_LOG_FILES = 'DeleteLogFiles'; export const DELETE_UPDATE_LOG_FILES = 'DeleteUpdateLogFiles'; -export const DOWNLOADED_ALBUMS_SCAN = 'DownloadedBooksScan'; -export const ALBUM_SEARCH = 'BookSearch'; +export const DOWNLOADED_BOOKS_SCAN = 'DownloadedBooksScan'; +export const BOOK_SEARCH = 'BookSearch'; export const INTERACTIVE_IMPORT = 'ManualImport'; -export const MISSING_ALBUM_SEARCH = 'MissingBookSearch'; -export const MOVE_ARTIST = 'MoveAuthor'; -export const REFRESH_ARTIST = 'RefreshAuthor'; +export const MISSING_BOOK_SEARCH = 'MissingBookSearch'; +export const MOVE_AUTHOR = 'MoveAuthor'; +export const REFRESH_AUTHOR = 'RefreshAuthor'; export const RENAME_FILES = 'RenameFiles'; -export const RENAME_ARTIST = 'RenameAuthor'; +export const RENAME_AUTHOR = 'RenameAuthor'; export const RESCAN_FOLDERS = 'RescanFolders'; export const RETAG_FILES = 'RetagFiles'; -export const RETAG_ARTIST = 'RetagAuthor'; +export const RETAG_AUTHOR = 'RetagAuthor'; export const RESET_API_KEY = 'ResetApiKey'; export const RSS_SYNC = 'RssSync'; export const SEASON_SEARCH = 'BookSearch'; -export const ARTIST_SEARCH = 'AuthorSearch'; +export const AUTHOR_SEARCH = 'AuthorSearch'; diff --git a/frontend/src/Components/Filter/Builder/ArtistStatusFilterBuilderRowValue.js b/frontend/src/Components/Filter/Builder/AuthorStatusFilterBuilderRowValue.js similarity index 73% rename from frontend/src/Components/Filter/Builder/ArtistStatusFilterBuilderRowValue.js rename to frontend/src/Components/Filter/Builder/AuthorStatusFilterBuilderRowValue.js index 28070d200..155dbfca3 100644 --- a/frontend/src/Components/Filter/Builder/ArtistStatusFilterBuilderRowValue.js +++ b/frontend/src/Components/Filter/Builder/AuthorStatusFilterBuilderRowValue.js @@ -6,7 +6,7 @@ const protocols = [ { id: 'ended', name: 'Ended' } ]; -function ArtistStatusFilterBuilderRowValue(props) { +function AuthorStatusFilterBuilderRowValue(props) { return ( albumReleases, - (albumReleases) => { - const values = _.map(albumReleases.value, (albumRelease) => { - - return { - key: albumRelease.foreignReleaseId, - value: `${albumRelease.title}` + - `${albumRelease.disambiguation ? ' (' : ''}${titleCase(albumRelease.disambiguation)}${albumRelease.disambiguation ? ')' : ''}` + - `, ${albumRelease.mediumCount} med, ${albumRelease.trackCount} tracks` + - `${albumRelease.country.length > 0 ? ', ' : ''}${albumRelease.country}` + - `${albumRelease.format ? ', [' : ''}${albumRelease.format}${albumRelease.format ? ']' : ''}` - }; - }); - - const sortedValues = _.orderBy(values, ['value']); - - const value = _.find(albumReleases.value, { monitored: true }).foreignReleaseId; - - return { - values: sortedValues, - value - }; - } - ); -} - -class AlbumReleaseSelectInputConnector extends Component { - - // - // Listeners - - onChange = ({ name, value }) => { - const { - albumReleases - } = this.props; - - const updatedReleases = _.map(albumReleases.value, (e) => ({ ...e, monitored: false })); - _.find(updatedReleases, { foreignReleaseId: value }).monitored = true; - - this.props.onChange({ name, value: updatedReleases }); - } - - render() { - - return ( - - ); - } -} - -AlbumReleaseSelectInputConnector.propTypes = { - name: PropTypes.string.isRequired, - onChange: PropTypes.func.isRequired, - albumReleases: PropTypes.object -}; - -export default connect(createMapStateToProps)(AlbumReleaseSelectInputConnector); diff --git a/frontend/src/Components/Form/BookReleaseSelectInputConnector.js b/frontend/src/Components/Form/BookReleaseSelectInputConnector.js new file mode 100644 index 000000000..47219acf6 --- /dev/null +++ b/frontend/src/Components/Form/BookReleaseSelectInputConnector.js @@ -0,0 +1,70 @@ +import _ from 'lodash'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { createSelector } from 'reselect'; +import titleCase from 'Utilities/String/titleCase'; +import SelectInput from './SelectInput'; + +function createMapStateToProps() { + return createSelector( + (state, { bookReleases }) => bookReleases, + (bookReleases) => { + const values = _.map(bookReleases.value, (bookRelease) => { + + return { + key: bookRelease.foreignReleaseId, + value: `${bookRelease.title}` + + `${bookRelease.disambiguation ? ' (' : ''}${titleCase(bookRelease.disambiguation)}${bookRelease.disambiguation ? ')' : ''}` + + `, ${bookRelease.mediumCount} med, ${bookRelease.bookCount} books` + + `${bookRelease.country.length > 0 ? ', ' : ''}${bookRelease.country}` + + `${bookRelease.format ? ', [' : ''}${bookRelease.format}${bookRelease.format ? ']' : ''}` + }; + }); + + const sortedValues = _.orderBy(values, ['value']); + + const value = _.find(bookReleases.value, { monitored: true }).foreignReleaseId; + + return { + values: sortedValues, + value + }; + } + ); +} + +class BookReleaseSelectInputConnector extends Component { + + // + // Listeners + + onChange = ({ name, value }) => { + const { + bookReleases + } = this.props; + + const updatedReleases = _.map(bookReleases.value, (e) => ({ ...e, monitored: false })); + _.find(updatedReleases, { foreignReleaseId: value }).monitored = true; + + this.props.onChange({ name, value: updatedReleases }); + } + + render() { + + return ( + + ); + } +} + +BookReleaseSelectInputConnector.propTypes = { + name: PropTypes.string.isRequired, + onChange: PropTypes.func.isRequired, + bookReleases: PropTypes.object +}; + +export default connect(createMapStateToProps)(BookReleaseSelectInputConnector); diff --git a/frontend/src/Components/Form/FormInputGroup.js b/frontend/src/Components/Form/FormInputGroup.js index 5b5dd2792..73552bef1 100644 --- a/frontend/src/Components/Form/FormInputGroup.js +++ b/frontend/src/Components/Form/FormInputGroup.js @@ -8,14 +8,14 @@ import CheckInput from './CheckInput'; import DeviceInputConnector from './DeviceInputConnector'; import PlaylistInputConnector from './PlaylistInputConnector'; import KeyValueListInput from './KeyValueListInput'; -import MonitorAlbumsSelectInput from './MonitorAlbumsSelectInput'; +import MonitorBooksSelectInput from './MonitorBooksSelectInput'; import NumberInput from './NumberInput'; import OAuthInputConnector from './OAuthInputConnector'; import PasswordInput from './PasswordInput'; import PathInputConnector from './PathInputConnector'; import QualityProfileSelectInputConnector from './QualityProfileSelectInputConnector'; import MetadataProfileSelectInputConnector from './MetadataProfileSelectInputConnector'; -import AlbumReleaseSelectInputConnector from './AlbumReleaseSelectInputConnector'; +import BookReleaseSelectInputConnector from './BookReleaseSelectInputConnector'; import RootFolderSelectInputConnector from './RootFolderSelectInputConnector'; import SeriesTypeSelectInput from './SeriesTypeSelectInput'; import EnhancedSelectInput from './EnhancedSelectInput'; @@ -45,8 +45,8 @@ function getComponent(type) { case inputTypes.KEY_VALUE_LIST: return KeyValueListInput; - case inputTypes.MONITOR_ALBUMS_SELECT: - return MonitorAlbumsSelectInput; + case inputTypes.MONITOR_BOOKS_SELECT: + return MonitorBooksSelectInput; case inputTypes.NUMBER: return NumberInput; @@ -66,8 +66,8 @@ function getComponent(type) { case inputTypes.METADATA_PROFILE_SELECT: return MetadataProfileSelectInputConnector; - case inputTypes.ALBUM_RELEASE_SELECT: - return AlbumReleaseSelectInputConnector; + case inputTypes.BOOK_RELEASE_SELECT: + return BookReleaseSelectInputConnector; case inputTypes.ROOT_FOLDER_SELECT: return RootFolderSelectInputConnector; diff --git a/frontend/src/Components/Form/MonitorAlbumsSelectInput.js b/frontend/src/Components/Form/MonitorBooksSelectInput.js similarity index 76% rename from frontend/src/Components/Form/MonitorAlbumsSelectInput.js rename to frontend/src/Components/Form/MonitorBooksSelectInput.js index a3780de56..3eeeae41a 100644 --- a/frontend/src/Components/Form/MonitorAlbumsSelectInput.js +++ b/frontend/src/Components/Form/MonitorBooksSelectInput.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; -import monitorOptions from 'Utilities/Artist/monitorOptions'; +import monitorOptions from 'Utilities/Author/monitorOptions'; import SelectInput from './SelectInput'; -function MonitorAlbumsSelectInput(props) { +function MonitorBooksSelectInput(props) { const { includeNoChange, includeMixed, @@ -36,15 +36,15 @@ function MonitorAlbumsSelectInput(props) { ); } -MonitorAlbumsSelectInput.propTypes = { +MonitorBooksSelectInput.propTypes = { includeNoChange: PropTypes.bool.isRequired, includeMixed: PropTypes.bool.isRequired, onChange: PropTypes.func.isRequired }; -MonitorAlbumsSelectInput.defaultProps = { +MonitorBooksSelectInput.defaultProps = { includeNoChange: false, includeMixed: false }; -export default MonitorAlbumsSelectInput; +export default MonitorBooksSelectInput; diff --git a/frontend/src/Components/Form/SeriesTypeSelectInput.js b/frontend/src/Components/Form/SeriesTypeSelectInput.js index 4fe0a974c..b31e51838 100644 --- a/frontend/src/Components/Form/SeriesTypeSelectInput.js +++ b/frontend/src/Components/Form/SeriesTypeSelectInput.js @@ -2,14 +2,14 @@ import PropTypes from 'prop-types'; import React from 'react'; import SelectInput from './SelectInput'; -const artistTypeOptions = [ +const authorTypeOptions = [ { key: 'standard', value: 'Standard' }, { key: 'daily', value: 'Daily' }, { key: 'anime', value: 'Anime' } ]; function SeriesTypeSelectInput(props) { - const values = [...artistTypeOptions]; + const values = [...authorTypeOptions]; const { includeNoChange, diff --git a/frontend/src/Components/Loading/LoadingMessage.js b/frontend/src/Components/Loading/LoadingMessage.js index 3483708d9..607f48dd2 100644 --- a/frontend/src/Components/Loading/LoadingMessage.js +++ b/frontend/src/Components/Loading/LoadingMessage.js @@ -12,7 +12,7 @@ const messages = [ 'Hum something loud while others stare', 'Loading humorous message... Please Wait', 'I could\'ve been faster in Python', - 'Don\'t forget to rewind your tracks', + 'Don\'t forget to return your library books', 'Congratulations! you are the 1000th visitor.', 'HELP! I\'m being held hostage and forced to write these stupid lines!', 'RE-calibrating the internet...', diff --git a/frontend/src/Components/MonitorToggleButton.js b/frontend/src/Components/MonitorToggleButton.js index c92db9bc0..964a59c2c 100644 --- a/frontend/src/Components/MonitorToggleButton.js +++ b/frontend/src/Components/MonitorToggleButton.js @@ -7,7 +7,7 @@ import styles from './MonitorToggleButton.css'; function getTooltip(monitored, isDisabled) { if (isDisabled) { - return 'Cannot toogle monitored state when artist is unmonitored'; + return 'Cannot toogle monitored state when author is unmonitored'; } if (monitored) { diff --git a/frontend/src/Components/Page/ErrorPage.js b/frontend/src/Components/Page/ErrorPage.js index d981f8988..7163a8952 100644 --- a/frontend/src/Components/Page/ErrorPage.js +++ b/frontend/src/Components/Page/ErrorPage.js @@ -7,7 +7,7 @@ function ErrorPage(props) { const { version, isLocalStorageSupported, - artistError, + authorError, customFiltersError, tagsError, qualityProfilesError, @@ -20,8 +20,8 @@ function ErrorPage(props) { if (!isLocalStorageSupported) { errorMessage = 'Local Storage is not supported or disabled. A plugin or private browsing may have disabled it.'; - } else if (artistError) { - errorMessage = getErrorMessage(artistError, 'Failed to load artist from API'); + } else if (authorError) { + errorMessage = getErrorMessage(authorError, 'Failed to load author from API'); } else if (customFiltersError) { errorMessage = getErrorMessage(customFiltersError, 'Failed to load custom filters from API'); } else if (tagsError) { @@ -52,7 +52,7 @@ function ErrorPage(props) { ErrorPage.propTypes = { version: PropTypes.string.isRequired, isLocalStorageSupported: PropTypes.bool.isRequired, - artistError: PropTypes.object, + authorError: PropTypes.object, customFiltersError: PropTypes.object, tagsError: PropTypes.object, qualityProfilesError: PropTypes.object, diff --git a/frontend/src/Components/Page/Header/ArtistSearchInput.css b/frontend/src/Components/Page/Header/AuthorSearchInput.css similarity index 95% rename from frontend/src/Components/Page/Header/ArtistSearchInput.css rename to frontend/src/Components/Page/Header/AuthorSearchInput.css index 7043de6c5..b4710f443 100644 --- a/frontend/src/Components/Page/Header/ArtistSearchInput.css +++ b/frontend/src/Components/Page/Header/AuthorSearchInput.css @@ -34,14 +34,14 @@ flex-grow: 1; } -.artistContainer { +.authorContainer { @add-mixin scrollbar; @add-mixin scrollbarTrack; @add-mixin scrollbarThumb; } .containerOpen { - .artistContainer { + .authorContainer { position: absolute; top: 42px; z-index: 1; @@ -78,7 +78,7 @@ color: $disabledColor; } -.addNewArtistSuggestion { +.addNewAuthorSuggestion { padding: 0 3px; cursor: pointer; } diff --git a/frontend/src/Components/Page/Header/ArtistSearchInput.js b/frontend/src/Components/Page/Header/AuthorSearchInput.js similarity index 82% rename from frontend/src/Components/Page/Header/ArtistSearchInput.js rename to frontend/src/Components/Page/Header/AuthorSearchInput.js index 8aca2b055..cb0840517 100644 --- a/frontend/src/Components/Page/Header/ArtistSearchInput.js +++ b/frontend/src/Components/Page/Header/AuthorSearchInput.js @@ -5,16 +5,16 @@ import Autosuggest from 'react-autosuggest'; import { icons } from 'Helpers/Props'; import Icon from 'Components/Icon'; import keyboardShortcuts, { shortcuts } from 'Components/keyboardShortcuts'; -import ArtistSearchResult from './ArtistSearchResult'; +import AuthorSearchResult from './AuthorSearchResult'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import FuseWorker from './fuse.worker'; -import styles from './ArtistSearchInput.css'; +import styles from './AuthorSearchInput.css'; const LOADING_TYPE = 'suggestionsLoading'; const ADD_NEW_TYPE = 'addNew'; const workerInstance = new FuseWorker(); -class ArtistSearchInput extends Component { +class AuthorSearchInput extends Component { // // Lifecycle @@ -31,7 +31,7 @@ class ArtistSearchInput extends Component { } componentDidMount() { - this.props.bindShortcut(shortcuts.ARTIST_SEARCH_INPUT.key, this.focusInput); + this.props.bindShortcut(shortcuts.AUTHOR_SEARCH_INPUT.key, this.focusInput); workerInstance.addEventListener('message', this.onSuggestionsReceived, false); } @@ -66,7 +66,7 @@ class ArtistSearchInput extends Component { renderSuggestion(item, { query }) { if (item.type === ADD_NEW_TYPE) { return ( -
+
Search for {query}
); @@ -79,16 +79,16 @@ class ArtistSearchInput extends Component { } return ( - ); } - goToArtist(item) { + goToAuthor(item) { this.setState({ value: '' }); - this.props.onGoToArtist(item.item.titleSlug); + this.props.onGoToAuthor(item.item.titleSlug); } reset() { @@ -125,20 +125,20 @@ class ArtistSearchInput extends Component { } = this._autosuggest.state; if (!suggestions.length || suggestions[0].type === LOADING_TYPE || highlightedSectionIndex) { - this.props.onGoToAddNewArtist(value); + this.props.onGoToAddNewAuthor(value); this._autosuggest.input.blur(); this.reset(); return; } - // If an suggestion is not selected go to the first artist, - // otherwise go to the selected artist. + // If an suggestion is not selected go to the first author, + // otherwise go to the selected author. if (highlightedSuggestionIndex == null) { - this.goToArtist(suggestions[0]); + this.goToAuthor(suggestions[0]); } else { - this.goToArtist(suggestions[highlightedSuggestionIndex]); + this.goToAuthor(suggestions[highlightedSuggestionIndex]); } this._autosuggest.input.blur(); @@ -164,7 +164,7 @@ class ArtistSearchInput extends Component { requestSuggestions = _.debounce((value) => { const payload = { value, - artists: this.props.artists + authors: this.props.authors }; workerInstance.postMessage(payload); @@ -184,9 +184,9 @@ class ArtistSearchInput extends Component { onSuggestionSelected = (event, { suggestion }) => { if (suggestion.type === ADD_NEW_TYPE) { - this.props.onGoToAddNewArtist(this.state.value); + this.props.onGoToAddNewAuthor(this.state.value); } else { - this.goToArtist(suggestion); + this.goToAuthor(suggestion); } } @@ -203,7 +203,7 @@ class ArtistSearchInput extends Component { if (suggestions.length) { suggestionGroups.push({ - title: 'Existing Artist', + title: 'Existing Author', suggestions }); } @@ -221,7 +221,7 @@ class ArtistSearchInput extends Component { const inputProps = { ref: this.setInputRef, className: styles.input, - name: 'artistSearch', + name: 'authorSearch', value, placeholder: 'Search', autoComplete: 'off', @@ -235,7 +235,7 @@ class ArtistSearchInput extends Component { const theme = { container: styles.container, containerOpen: styles.containerOpen, - suggestionsContainer: styles.artistContainer, + suggestionsContainer: styles.authorContainer, suggestionsList: styles.list, suggestion: styles.listItem, suggestionHighlighted: styles.highlighted @@ -266,11 +266,11 @@ class ArtistSearchInput extends Component { } } -ArtistSearchInput.propTypes = { - artists: PropTypes.arrayOf(PropTypes.object).isRequired, - onGoToArtist: PropTypes.func.isRequired, - onGoToAddNewArtist: PropTypes.func.isRequired, +AuthorSearchInput.propTypes = { + authors: PropTypes.arrayOf(PropTypes.object).isRequired, + onGoToAuthor: PropTypes.func.isRequired, + onGoToAddNewAuthor: PropTypes.func.isRequired, bindShortcut: PropTypes.func.isRequired }; -export default keyboardShortcuts(ArtistSearchInput); +export default keyboardShortcuts(AuthorSearchInput); diff --git a/frontend/src/Components/Page/Header/ArtistSearchInputConnector.js b/frontend/src/Components/Page/Header/AuthorSearchInputConnector.js similarity index 70% rename from frontend/src/Components/Page/Header/ArtistSearchInputConnector.js rename to frontend/src/Components/Page/Header/AuthorSearchInputConnector.js index c84007b47..79032b893 100644 --- a/frontend/src/Components/Page/Header/ArtistSearchInputConnector.js +++ b/frontend/src/Components/Page/Header/AuthorSearchInputConnector.js @@ -1,27 +1,27 @@ import { connect } from 'react-redux'; import { push } from 'connected-react-router'; import { createSelector } from 'reselect'; -import createAllArtistSelector from 'Store/Selectors/createAllArtistSelector'; +import createAllAuthorSelector from 'Store/Selectors/createAllAuthorsSelector'; import createDeepEqualSelector from 'Store/Selectors/createDeepEqualSelector'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; -import ArtistSearchInput from './ArtistSearchInput'; +import AuthorSearchInput from './AuthorSearchInput'; -function createCleanArtistSelector() { +function createCleanAuthorSelector() { return createSelector( - createAllArtistSelector(), + createAllAuthorSelector(), createTagsSelector(), - (allArtists, allTags) => { - return allArtists.map((artist) => { + (allAuthors, allTags) => { + return allAuthors.map((author) => { const { - artistName, + authorName, sortName, images, titleSlug, tags = [] - } = artist; + } = author; return { - artistName, + authorName, sortName, titleSlug, images, @@ -42,10 +42,10 @@ function createCleanArtistSelector() { function createMapStateToProps() { return createDeepEqualSelector( - createCleanArtistSelector(), - (artists) => { + createCleanAuthorSelector(), + (authors) => { return { - artists + authors }; } ); @@ -53,14 +53,14 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { - onGoToArtist(titleSlug) { + onGoToAuthor(titleSlug) { dispatch(push(`${window.Readarr.urlBase}/author/${titleSlug}`)); }, - onGoToAddNewArtist(query) { + onGoToAddNewAuthor(query) { dispatch(push(`${window.Readarr.urlBase}/add/search?term=${encodeURIComponent(query)}`)); } }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(ArtistSearchInput); +export default connect(createMapStateToProps, createMapDispatchToProps)(AuthorSearchInput); diff --git a/frontend/src/Components/Page/Header/ArtistSearchResult.css b/frontend/src/Components/Page/Header/AuthorSearchResult.css similarity index 100% rename from frontend/src/Components/Page/Header/ArtistSearchResult.css rename to frontend/src/Components/Page/Header/AuthorSearchResult.css diff --git a/frontend/src/Components/Page/Header/ArtistSearchResult.js b/frontend/src/Components/Page/Header/AuthorSearchResult.js similarity index 77% rename from frontend/src/Components/Page/Header/ArtistSearchResult.js rename to frontend/src/Components/Page/Header/AuthorSearchResult.js index 9e8511918..ae90b33a7 100644 --- a/frontend/src/Components/Page/Header/ArtistSearchResult.js +++ b/frontend/src/Components/Page/Header/AuthorSearchResult.js @@ -2,13 +2,13 @@ import PropTypes from 'prop-types'; import React from 'react'; import { kinds } from 'Helpers/Props'; import Label from 'Components/Label'; -import ArtistPoster from 'Artist/ArtistPoster'; -import styles from './ArtistSearchResult.css'; +import AuthorPoster from 'Author/AuthorPoster'; +import styles from './AuthorSearchResult.css'; -function ArtistSearchResult(props) { +function AuthorSearchResult(props) { const { match, - artistName, + authorName, images, tags } = props; @@ -21,7 +21,7 @@ function ArtistSearchResult(props) { return (
-
- {artistName} + {authorName}
{ @@ -51,11 +51,11 @@ function ArtistSearchResult(props) { ); } -ArtistSearchResult.propTypes = { - artistName: PropTypes.string.isRequired, +AuthorSearchResult.propTypes = { + authorName: PropTypes.string.isRequired, images: PropTypes.arrayOf(PropTypes.object).isRequired, tags: PropTypes.arrayOf(PropTypes.object).isRequired, match: PropTypes.object.isRequired }; -export default ArtistSearchResult; +export default AuthorSearchResult; diff --git a/frontend/src/Components/Page/Header/PageHeader.js b/frontend/src/Components/Page/Header/PageHeader.js index e4b9e59f4..fba921249 100644 --- a/frontend/src/Components/Page/Header/PageHeader.js +++ b/frontend/src/Components/Page/Header/PageHeader.js @@ -4,7 +4,7 @@ import { icons } from 'Helpers/Props'; import keyboardShortcuts, { shortcuts } from 'Components/keyboardShortcuts'; import IconButton from 'Components/Link/IconButton'; import Link from 'Components/Link/Link'; -import ArtistSearchInputConnector from './ArtistSearchInputConnector'; +import AuthorSearchInputConnector from './AuthorSearchInputConnector'; import PageHeaderActionsMenuConnector from './PageHeaderActionsMenuConnector'; import KeyboardShortcutsModal from './KeyboardShortcutsModal'; import styles from './PageHeader.css'; @@ -70,7 +70,7 @@ class PageHeader extends Component { />
- +
{ } const { - artists, + authors, value } = e.data; - self.postMessage(getSuggestions(artists, value)); + self.postMessage(getSuggestions(authors, value)); }); diff --git a/frontend/src/Components/Page/PageConnector.js b/frontend/src/Components/Page/PageConnector.js index 8d810479f..d630cf819 100644 --- a/frontend/src/Components/Page/PageConnector.js +++ b/frontend/src/Components/Page/PageConnector.js @@ -6,7 +6,7 @@ import { createSelector } from 'reselect'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; import { saveDimensions, setIsSidebarVisible } from 'Store/Actions/appActions'; import { fetchCustomFilters } from 'Store/Actions/customFilterActions'; -import { fetchArtist } from 'Store/Actions/artistActions'; +import { fetchAuthor } from 'Store/Actions/authorActions'; import { fetchTags } from 'Store/Actions/tagActions'; import { fetchQualityProfiles, fetchMetadataProfiles, fetchUISettings, fetchImportLists } from 'Store/Actions/settingsActions'; import { fetchStatus } from 'Store/Actions/systemActions'; @@ -138,8 +138,8 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { - dispatchFetchArtist() { - dispatch(fetchArtist()); + dispatchFetchAuthor() { + dispatch(fetchAuthor()); }, dispatchFetchCustomFilters() { dispatch(fetchCustomFilters()); @@ -186,7 +186,7 @@ class PageConnector extends Component { componentDidMount() { if (!this.props.isPopulated) { - this.props.dispatchFetchArtist(); + this.props.dispatchFetchAuthor(); this.props.dispatchFetchCustomFilters(); this.props.dispatchFetchTags(); this.props.dispatchFetchQualityProfiles(); @@ -211,7 +211,7 @@ class PageConnector extends Component { const { isPopulated, hasError, - dispatchFetchArtist, + dispatchFetchAuthor, dispatchFetchTags, dispatchFetchQualityProfiles, dispatchFetchMetadataProfiles, @@ -249,7 +249,7 @@ PageConnector.propTypes = { isPopulated: PropTypes.bool.isRequired, hasError: PropTypes.bool.isRequired, isSidebarVisible: PropTypes.bool.isRequired, - dispatchFetchArtist: PropTypes.func.isRequired, + dispatchFetchAuthor: PropTypes.func.isRequired, dispatchFetchCustomFilters: PropTypes.func.isRequired, dispatchFetchTags: PropTypes.func.isRequired, dispatchFetchQualityProfiles: PropTypes.func.isRequired, diff --git a/frontend/src/Components/Page/Sidebar/Messages/Message.js b/frontend/src/Components/Page/Sidebar/Messages/Message.js index f9f95cfa5..95b0b69f4 100644 --- a/frontend/src/Components/Page/Sidebar/Messages/Message.js +++ b/frontend/src/Components/Page/Sidebar/Messages/Message.js @@ -13,19 +13,19 @@ function getIconName(name) { return icons.BACKUP; case 'CheckHealth': return icons.HEALTH; - case 'AlbumSearch': + case 'BookSearch': return icons.SEARCH; case 'Housekeeping': return icons.HOUSEKEEPING; case 'RescanFolders': return icons.RESCAN; - case 'RefreshArtist': + case 'RefreshAuthor': return icons.REFRESH; case 'RssSync': return icons.RSS; case 'SeasonSearch': return icons.SEARCH; - case 'ArtistSearch': + case 'AuthorSearch': return icons.SEARCH; case 'UpdateSceneMapping': return icons.REFRESH; diff --git a/frontend/src/Components/Page/Sidebar/PageSidebar.js b/frontend/src/Components/Page/Sidebar/PageSidebar.js index c5848280a..31a4f4f9b 100644 --- a/frontend/src/Components/Page/Sidebar/PageSidebar.js +++ b/frontend/src/Components/Page/Sidebar/PageSidebar.js @@ -19,10 +19,10 @@ const SIDEBAR_WIDTH = parseInt(dimensions.sidebarWidth); const links = [ { - iconName: icons.ARTIST_CONTINUING, + iconName: icons.AUTHOR_CONTINUING, title: 'Library', to: '/', - alias: '/artist', + alias: '/author', children: [ { title: 'Add New', @@ -30,11 +30,11 @@ const links = [ }, { title: 'Mass Editor', - to: '/artisteditor' + to: '/authoreditor' }, { title: 'Bookshelf', - to: '/albumstudio' + to: '/bookshelf' }, { title: 'Unmapped Files', diff --git a/frontend/src/Components/SignalRConnector.js b/frontend/src/Components/SignalRConnector.js index a5223eb31..612761795 100644 --- a/frontend/src/Components/SignalRConnector.js +++ b/frontend/src/Components/SignalRConnector.js @@ -8,7 +8,7 @@ import titleCase from 'Utilities/String/titleCase'; import { fetchCommands, updateCommand, finishCommand } from 'Store/Actions/commandActions'; import { setAppValue, setVersion } from 'Store/Actions/appActions'; import { update, updateItem, removeItem } from 'Store/Actions/baseActions'; -import { fetchArtist } from 'Store/Actions/artistActions'; +import { fetchAuthor } from 'Store/Actions/authorActions'; import { fetchHealth } from 'Store/Actions/systemActions'; import { fetchQueue, fetchQueueDetails } from 'Store/Actions/queueActions'; import { fetchRootFolders } from 'Store/Actions/settingsActions'; @@ -45,7 +45,7 @@ const mapDispatchToProps = { dispatchUpdate: update, dispatchUpdateItem: updateItem, dispatchRemoveItem: removeItem, - dispatchFetchArtist: fetchArtist, + dispatchFetchAuthor: fetchAuthor, dispatchFetchHealth: fetchHealth, dispatchFetchQueue: fetchQueue, dispatchFetchQueueDetails: fetchQueueDetails, @@ -175,9 +175,9 @@ class SignalRConnector extends Component { } } - handleAlbum = (body) => { + handleBook = (body) => { const action = body.action; - const section = 'albums'; + const section = 'books'; if (action === 'updated') { this.props.dispatchUpdateItem({ @@ -193,18 +193,8 @@ class SignalRConnector extends Component { } } - handleTrack = (body) => { - if (body.action === 'updated') { - this.props.dispatchUpdateItem({ - section: 'tracks', - updateOnly: true, - ...body.resource - }); - } - } - - handleTrackfile = (body) => { - const section = 'trackFiles'; + handleBookfile = (body) => { + const section = 'bookFiles'; if (body.action === 'updated') { this.props.dispatchUpdateItem({ section, ...body.resource }); @@ -213,16 +203,16 @@ class SignalRConnector extends Component { } // Repopulate the page to handle recently imported file - repopulatePage('trackFileUpdated'); + repopulatePage('bookFileUpdated'); } handleHealth = () => { this.props.dispatchFetchHealth(); } - handleArtist = (body) => { + handleAuthor = (body) => { const action = body.action; - const section = 'artist'; + const section = 'authors'; if (action === 'updated') { this.props.dispatchUpdateItem({ section, ...body.resource }); @@ -315,7 +305,7 @@ class SignalRConnector extends Component { const { dispatchFetchCommands, - dispatchFetchArtist, + dispatchFetchAuthor, dispatchSetAppValue } = this.props; @@ -328,7 +318,7 @@ class SignalRConnector extends Component { // Repopulate the page (if a repopulator is set) to ensure things // are in sync after reconnecting. - dispatchFetchArtist(); + dispatchFetchAuthor(); dispatchFetchCommands(); repopulatePage(); } @@ -363,7 +353,7 @@ SignalRConnector.propTypes = { dispatchUpdate: PropTypes.func.isRequired, dispatchUpdateItem: PropTypes.func.isRequired, dispatchRemoveItem: PropTypes.func.isRequired, - dispatchFetchArtist: PropTypes.func.isRequired, + dispatchFetchAuthor: PropTypes.func.isRequired, dispatchFetchHealth: PropTypes.func.isRequired, dispatchFetchQueue: PropTypes.func.isRequired, dispatchFetchQueueDetails: PropTypes.func.isRequired, diff --git a/frontend/src/Components/keyboardShortcuts.js b/frontend/src/Components/keyboardShortcuts.js index eb0d7c1d7..a99a0dc7f 100644 --- a/frontend/src/Components/keyboardShortcuts.js +++ b/frontend/src/Components/keyboardShortcuts.js @@ -8,7 +8,7 @@ export const shortcuts = { name: 'Open This Modal' }, - ARTIST_SEARCH_INPUT: { + AUTHOR_SEARCH_INPUT: { key: 's', name: 'Focus Search Box' }, diff --git a/frontend/src/Helpers/Props/filterBuilderValueTypes.js b/frontend/src/Helpers/Props/filterBuilderValueTypes.js index 42df49eda..5fcec4378 100644 --- a/frontend/src/Helpers/Props/filterBuilderValueTypes.js +++ b/frontend/src/Helpers/Props/filterBuilderValueTypes.js @@ -7,5 +7,5 @@ export const METADATA_PROFILE = 'metadataProfile'; export const PROTOCOL = 'protocol'; export const QUALITY = 'quality'; export const QUALITY_PROFILE = 'qualityProfile'; -export const ARTIST_STATUS = 'artistStatus'; +export const AUTHOR_STATUS = 'authorStatus'; export const TAG = 'tag'; diff --git a/frontend/src/Helpers/Props/icons.js b/frontend/src/Helpers/Props/icons.js index 122c1e8e3..87338cec4 100644 --- a/frontend/src/Helpers/Props/icons.js +++ b/frontend/src/Helpers/Props/icons.js @@ -30,6 +30,7 @@ import { faBan as fasBan, faBars as fasBars, faBolt as fasBolt, + faBook as fasBook, faBookmark as fasBookmark, faBookReader as fasBookReader, faBug as fasBug, @@ -111,7 +112,7 @@ import { export const ACTIONS = fasBolt; export const ACTIVITY = farClock; export const ADD = fasPlus; -export const ADD_MISSING_ARTISTS = fasSearchPlus; +export const ADD_MISSING_AUTHORS = fasSearchPlus; export const ALTERNATE_TITLES = farClone; export const ADVANCED_SETTINGS = fasCog; export const ARROW_LEFT = fasArrowCircleLeft; @@ -120,6 +121,7 @@ export const ARROW_RIGHT_NO_CIRCLE = fasLongArrowAltRight; export const ARROW_UP = fasArrowCircleUp; export const BACKUP = farFileArchive; export const BAN = fasBan; +export const BOOK = fasBook; export const BUG = fasBug; export const CALENDAR = fasCalendarAlt; export const CALENDAR_O = farCalendar; @@ -194,8 +196,8 @@ export const SAVE = fasSave; export const SCHEDULED = farClock; export const SCORE = fasUserPlus; export const SEARCH = fasSearch; -export const ARTIST_CONTINUING = fasPlay; -export const ARTIST_ENDED = fasStop; +export const AUTHOR_CONTINUING = fasPlay; +export const AUTHOR_ENDED = fasStop; export const SETTINGS = fasCogs; export const SHUTDOWN = fasPowerOff; export const SORT = fasSort; diff --git a/frontend/src/Helpers/Props/inputTypes.js b/frontend/src/Helpers/Props/inputTypes.js index 172ca331c..ae6ba08ee 100644 --- a/frontend/src/Helpers/Props/inputTypes.js +++ b/frontend/src/Helpers/Props/inputTypes.js @@ -4,17 +4,17 @@ export const CHECK = 'check'; export const DEVICE = 'device'; export const PLAYLIST = 'playlist'; export const KEY_VALUE_LIST = 'keyValueList'; -export const MONITOR_ALBUMS_SELECT = 'monitorAlbumsSelect'; +export const MONITOR_BOOKS_SELECT = 'monitorBooksSelect'; export const NUMBER = 'number'; export const OAUTH = 'oauth'; export const PASSWORD = 'password'; export const PATH = 'path'; export const QUALITY_PROFILE_SELECT = 'qualityProfileSelect'; export const METADATA_PROFILE_SELECT = 'metadataProfileSelect'; -export const ALBUM_RELEASE_SELECT = 'albumReleaseSelect'; +export const BOOK_RELEASE_SELECT = 'bookReleaseSelect'; export const ROOT_FOLDER_SELECT = 'rootFolderSelect'; export const SELECT = 'select'; -export const SERIES_TYPE_SELECT = 'artistTypeSelect'; +export const SERIES_TYPE_SELECT = 'authorTypeSelect'; export const TAG = 'tag'; export const TEXT = 'text'; export const TEXT_TAG = 'textTag'; @@ -26,14 +26,14 @@ export const all = [ DEVICE, PLAYLIST, KEY_VALUE_LIST, - MONITOR_ALBUMS_SELECT, + MONITOR_BOOKS_SELECT, NUMBER, OAUTH, PASSWORD, PATH, QUALITY_PROFILE_SELECT, METADATA_PROFILE_SELECT, - ALBUM_RELEASE_SELECT, + BOOK_RELEASE_SELECT, ROOT_FOLDER_SELECT, SELECT, SERIES_TYPE_SELECT, diff --git a/frontend/src/InteractiveImport/Artist/SelectArtistModal.js b/frontend/src/InteractiveImport/Author/SelectAuthorModal.js similarity index 71% rename from frontend/src/InteractiveImport/Artist/SelectArtistModal.js rename to frontend/src/InteractiveImport/Author/SelectAuthorModal.js index 39dd67300..59b83e952 100644 --- a/frontend/src/InteractiveImport/Artist/SelectArtistModal.js +++ b/frontend/src/InteractiveImport/Author/SelectAuthorModal.js @@ -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} > - @@ -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; diff --git a/frontend/src/InteractiveImport/Album/SelectAlbumModalContent.css b/frontend/src/InteractiveImport/Author/SelectAuthorModalContent.css similarity index 100% rename from frontend/src/InteractiveImport/Album/SelectAlbumModalContent.css rename to frontend/src/InteractiveImport/Author/SelectAuthorModalContent.css diff --git a/frontend/src/InteractiveImport/Artist/SelectArtistModalContent.js b/frontend/src/InteractiveImport/Author/SelectAuthorModalContent.js similarity index 76% rename from frontend/src/InteractiveImport/Artist/SelectArtistModalContent.js rename to frontend/src/InteractiveImport/Author/SelectAuthorModalContent.js index b180d319b..13ee3c087 100644 --- a/frontend/src/InteractiveImport/Artist/SelectArtistModalContent.js +++ b/frontend/src/InteractiveImport/Author/SelectAuthorModalContent.js @@ -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 ( - Manual Import - Select Artist + Manual Import - Select Author { items.map((item) => { - return item.artistName.toLowerCase().includes(filter) ? + return item.authorName.toLowerCase().includes(filter) ? ( - ) : 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; diff --git a/frontend/src/InteractiveImport/Artist/SelectArtistModalContentConnector.js b/frontend/src/InteractiveImport/Author/SelectAuthorModalContentConnector.js similarity index 70% rename from frontend/src/InteractiveImport/Artist/SelectArtistModalContentConnector.js rename to frontend/src/InteractiveImport/Author/SelectAuthorModalContentConnector.js index c6cd767cb..cb41990ee 100644 --- a/frontend/src/InteractiveImport/Artist/SelectArtistModalContentConnector.js +++ b/frontend/src/InteractiveImport/Author/SelectAuthorModalContentConnector.js @@ -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 ( - ); } } -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); diff --git a/frontend/src/InteractiveImport/Artist/SelectArtistRow.css b/frontend/src/InteractiveImport/Author/SelectAuthorRow.css similarity index 85% rename from frontend/src/InteractiveImport/Artist/SelectArtistRow.css rename to frontend/src/InteractiveImport/Author/SelectAuthorRow.css index 376c3fe84..5a7d9e41f 100644 --- a/frontend/src/InteractiveImport/Artist/SelectArtistRow.css +++ b/frontend/src/InteractiveImport/Author/SelectAuthorRow.css @@ -1,4 +1,4 @@ -.artist { +.author { padding: 8px; border-bottom: 1px solid $borderColor; } diff --git a/frontend/src/InteractiveImport/Artist/SelectArtistRow.js b/frontend/src/InteractiveImport/Author/SelectAuthorRow.js similarity index 50% rename from frontend/src/InteractiveImport/Artist/SelectArtistRow.js rename to frontend/src/InteractiveImport/Author/SelectAuthorRow.js index dcf252bb6..e80e3a5f4 100644 --- a/frontend/src/InteractiveImport/Artist/SelectArtistRow.js +++ b/frontend/src/InteractiveImport/Author/SelectAuthorRow.js @@ -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 ( - {this.props.artistName} + {this.props.authorName} ); } } -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; diff --git a/frontend/src/InteractiveImport/Album/SelectAlbumModal.js b/frontend/src/InteractiveImport/Book/SelectBookModal.js similarity index 69% rename from frontend/src/InteractiveImport/Album/SelectAlbumModal.js rename to frontend/src/InteractiveImport/Book/SelectBookModal.js index d4f26f4ff..067e8f0bf 100644 --- a/frontend/src/InteractiveImport/Album/SelectAlbumModal.js +++ b/frontend/src/InteractiveImport/Book/SelectBookModal.js @@ -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} > - @@ -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; diff --git a/frontend/src/InteractiveImport/Artist/SelectArtistModalContent.css b/frontend/src/InteractiveImport/Book/SelectBookModalContent.css similarity index 100% rename from frontend/src/InteractiveImport/Artist/SelectArtistModalContent.css rename to frontend/src/InteractiveImport/Book/SelectBookModalContent.css diff --git a/frontend/src/InteractiveImport/Album/SelectAlbumModalContent.js b/frontend/src/InteractiveImport/Book/SelectBookModalContent.js similarity index 87% rename from frontend/src/InteractiveImport/Album/SelectAlbumModalContent.js rename to frontend/src/InteractiveImport/Book/SelectBookModalContent.js index 7b725c0c9..bbc928960 100644 --- a/frontend/src/InteractiveImport/Album/SelectAlbumModalContent.js +++ b/frontend/src/InteractiveImport/Book/SelectBookModalContent.js @@ -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) ? ( - ) : @@ -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; diff --git a/frontend/src/InteractiveImport/Album/SelectAlbumModalContentConnector.js b/frontend/src/InteractiveImport/Book/SelectBookModalContentConnector.js similarity index 55% rename from frontend/src/InteractiveImport/Album/SelectAlbumModalContentConnector.js rename to frontend/src/InteractiveImport/Book/SelectBookModalContentConnector.js index 7fd361460..d5eec7b55 100644 --- a/frontend/src/InteractiveImport/Album/SelectAlbumModalContentConnector.js +++ b/frontend/src/InteractiveImport/Book/SelectBookModalContentConnector.js @@ -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 ( - ); } } -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); diff --git a/frontend/src/InteractiveImport/Album/SelectAlbumRow.css b/frontend/src/InteractiveImport/Book/SelectBookRow.css similarity index 63% rename from frontend/src/InteractiveImport/Album/SelectAlbumRow.css rename to frontend/src/InteractiveImport/Book/SelectBookRow.css index e78f0bc19..820eb9bc6 100644 --- a/frontend/src/InteractiveImport/Album/SelectAlbumRow.css +++ b/frontend/src/InteractiveImport/Book/SelectBookRow.css @@ -1,3 +1,3 @@ -.albumRow { +.bookRow { cursor: pointer; } diff --git a/frontend/src/InteractiveImport/Album/SelectAlbumRow.js b/frontend/src/InteractiveImport/Book/SelectBookRow.js similarity index 72% rename from frontend/src/InteractiveImport/Album/SelectAlbumRow.js rename to frontend/src/InteractiveImport/Book/SelectBookRow.js index d3f69b057..8c44ae42f 100644 --- a/frontend/src/InteractiveImport/Album/SelectAlbumRow.js +++ b/frontend/src/InteractiveImport/Book/SelectBookRow.js @@ -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 ( { columns.map((column) => { @@ -74,10 +74,10 @@ class SelectAlbumRow extends Component { ); } - if (name === 'albumType') { + if (name === 'bookType') { return ( - {albumType} + {bookType} ); } @@ -97,12 +97,12 @@ class SelectAlbumRow extends Component { key={name} > @@ -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; diff --git a/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContent.js b/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContent.js index 39b156d5e..3e1e9966f 100644 --- a/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContent.js +++ b/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContent.js @@ -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 ( -
- {album.title} +
+ {book.title}
    { _.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 &&
    - You already have files imported for the albums listed below. If you continue, the existing files will be deleted and the new files imported in their place. + You already have files imported for the books listed below. If you continue, the existing files will be deleted and the new files imported in their place. To avoid deleting existing files, press 'Cancel' and use the 'Combine with existing files' option. { _.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() }
    @@ -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, diff --git a/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContentConnector.js b/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContentConnector.js index a21ca74ce..82b29e4ff 100644 --- a/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContentConnector.js +++ b/frontend/src/InteractiveImport/Confirmation/ConfirmImportModalContentConnector.js @@ -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 }; diff --git a/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContentConnector.js b/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContentConnector.js index 8a6c58fb0..eb979cb6a 100644 --- a/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContentConnector.js +++ b/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContentConnector.js @@ -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 }); diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js index 11526b16c..56242364c 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.js @@ -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 {
- - @@ -480,7 +480,7 @@ class InteractiveImportModalContent extends Component { @@ -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, diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js index 7b2240b80..53ed0206b 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContentConnector.js @@ -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 diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js b/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js index 04fc240e9..e79859c14 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportRow.js @@ -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 { { - showArtistPlaceholder ? : artistName + showAuthorPlaceholder ? : authorName } { - showAlbumNumberPlaceholder ? : albumTitle + showBookNumberPlaceholder ? : bookTitle } @@ -221,7 +221,7 @@ class InteractiveImportRow extends Component { { !showQualityPlaceholder && !!quality && - @@ -262,17 +262,17 @@ class InteractiveImportRow extends Component { } - - - Unable to load results for this album search. Try again later + Unable to load results for this book search. Try again later
: null } diff --git a/frontend/src/InteractiveSearch/InteractiveSearchConnector.js b/frontend/src/InteractiveSearch/InteractiveSearchConnector.js index b8b764aa7..0045a399d 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchConnector.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchConnector.js @@ -34,9 +34,9 @@ function createMapDispatchToProps(dispatch, props) { }, onFilterSelect(selectedFilterKey) { - const action = props.type === 'album' ? - releaseActions.setAlbumReleasesFilter : - releaseActions.setArtistReleasesFilter; + const action = props.type === 'book' ? + releaseActions.setBookReleasesFilter : + releaseActions.setAuthorReleasesFilter; dispatch(action({ selectedFilterKey })); }, diff --git a/frontend/src/InteractiveSearch/InteractiveSearchFilterMenuConnector.js b/frontend/src/InteractiveSearch/InteractiveSearchFilterMenuConnector.js index a563123db..bec021a8e 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchFilterMenuConnector.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchFilterMenuConnector.js @@ -19,9 +19,9 @@ function createMapStateToProps(appState, { type }) { function createMapDispatchToProps(dispatch, props) { return { onFilterSelect(selectedFilterKey) { - const action = props.type === 'album' ? - releaseActions.setAlbumReleasesFilter : - releaseActions.setArtistReleasesFilter; + const action = props.type === 'book' ? + releaseActions.setBookReleasesFilter : + releaseActions.setAuthorReleasesFilter; dispatch(action({ selectedFilterKey })); } }; diff --git a/frontend/src/InteractiveSearch/InteractiveSearchFilterModalConnector.js b/frontend/src/InteractiveSearch/InteractiveSearchFilterModalConnector.js index 5f79d0ec1..bbac41b60 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchFilterModalConnector.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchFilterModalConnector.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { setAlbumReleasesFilter, setArtistReleasesFilter } from 'Store/Actions/releaseActions'; +import { setBookReleasesFilter, setAuthorReleasesFilter } from 'Store/Actions/releaseActions'; import FilterModal from 'Components/Filter/FilterModal'; function createMapStateToProps() { @@ -20,9 +20,9 @@ function createMapStateToProps() { function createMapDispatchToProps(dispatch, props) { return { dispatchSetFilter(payload) { - const action = props.type === 'album' ? - setAlbumReleasesFilter: - setArtistReleasesFilter; + const action = props.type === 'book' ? + setBookReleasesFilter: + setAuthorReleasesFilter; dispatch(action(payload)); } diff --git a/frontend/src/InteractiveSearch/InteractiveSearchRow.js b/frontend/src/InteractiveSearch/InteractiveSearchRow.js index 0f3c11757..997469bab 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchRow.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchRow.js @@ -11,7 +11,7 @@ import ConfirmModal from 'Components/Modal/ConfirmModal'; import TableRow from 'Components/Table/TableRow'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import Popover from 'Components/Tooltip/Popover'; -import TrackQuality from 'Album/TrackQuality'; +import BookQuality from 'Book/BookQuality'; import ProtocolLabel from 'Activity/Queue/ProtocolLabel'; import Peers from './Peers'; import styles from './InteractiveSearchRow.css'; @@ -161,7 +161,7 @@ class InteractiveSearchRow extends Component { - + @@ -214,7 +214,7 @@ class InteractiveSearchRow extends Component { isOpen={this.state.isConfirmGrabModalOpen} kind={kinds.WARNING} title="Grab Release" - message={`Readarr was unable to determine which artist and album this release was for. Readarr may be unable to automatically import this release. Do you want to grab '${title}'?`} + message={`Readarr was unable to determine which author and book this release was for. Readarr may be unable to automatically import this release. Do you want to grab '${title}'?`} confirmLabel="Grab" onConfirm={this.onGrabConfirm} onCancel={this.onGrabCancel} diff --git a/frontend/src/Organize/OrganizePreviewModalContent.js b/frontend/src/Organize/OrganizePreviewModalContent.js index c263208d4..d61da81c8 100644 --- a/frontend/src/Organize/OrganizePreviewModalContent.js +++ b/frontend/src/Organize/OrganizePreviewModalContent.js @@ -125,11 +125,11 @@ class OrganizePreviewModalContent extends Component { items.map((item) => { return ( ); diff --git a/frontend/src/Organize/OrganizePreviewModalContentConnector.js b/frontend/src/Organize/OrganizePreviewModalContentConnector.js index ee6de407f..cc0bdd80e 100644 --- a/frontend/src/Organize/OrganizePreviewModalContentConnector.js +++ b/frontend/src/Organize/OrganizePreviewModalContentConnector.js @@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import { fetchOrganizePreview } from 'Store/Actions/organizePreviewActions'; import { fetchNamingSettings } from 'Store/Actions/settingsActions'; import { executeCommand } from 'Store/Actions/commandActions'; @@ -13,14 +13,14 @@ function createMapStateToProps() { return createSelector( (state) => state.organizePreview, (state) => state.settings.naming, - createArtistSelector(), - (organizePreview, naming, artist) => { + createAuthorSelector(), + (organizePreview, naming, author) => { const props = { ...organizePreview }; props.isFetching = organizePreview.isFetching || naming.isFetching; props.isPopulated = organizePreview.isPopulated && naming.isPopulated; props.error = organizePreview.error || naming.error; props.trackFormat = naming.item.standardBookFormat; - props.path = artist.path; + props.path = author.path; return props; } diff --git a/frontend/src/Retag/RetagPreviewModalContent.js b/frontend/src/Retag/RetagPreviewModalContent.js index fb7a39c1b..c14ec246d 100644 --- a/frontend/src/Retag/RetagPreviewModalContent.js +++ b/frontend/src/Retag/RetagPreviewModalContent.js @@ -121,11 +121,11 @@ class RetagPreviewModalContent extends Component { items.map((item) => { return ( ); diff --git a/frontend/src/Retag/RetagPreviewModalContentConnector.js b/frontend/src/Retag/RetagPreviewModalContentConnector.js index ea40a63f4..92ae5fb67 100644 --- a/frontend/src/Retag/RetagPreviewModalContentConnector.js +++ b/frontend/src/Retag/RetagPreviewModalContentConnector.js @@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createArtistSelector from 'Store/Selectors/createArtistSelector'; +import createAuthorSelector from 'Store/Selectors/createAuthorSelector'; import { fetchRetagPreview } from 'Store/Actions/retagPreviewActions'; import { executeCommand } from 'Store/Actions/commandActions'; import * as commandNames from 'Commands/commandNames'; @@ -11,13 +11,13 @@ import RetagPreviewModalContent from './RetagPreviewModalContent'; function createMapStateToProps() { return createSelector( (state) => state.retagPreview, - createArtistSelector(), - (retagPreview, artist) => { + createAuthorSelector(), + (retagPreview, author) => { const props = { ...retagPreview }; props.isFetching = retagPreview.isFetching; props.isPopulated = retagPreview.isPopulated; props.error = retagPreview.error; - props.path = artist.path; + props.path = author.path; return props; } diff --git a/frontend/src/Search/AddNewItem.js b/frontend/src/Search/AddNewItem.js index 12dbb7d6f..9566e17e2 100644 --- a/frontend/src/Search/AddNewItem.js +++ b/frontend/src/Search/AddNewItem.js @@ -8,8 +8,8 @@ import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import TextInput from 'Components/Form/TextInput'; import PageContent from 'Components/Page/PageContent'; import PageContentBodyConnector from 'Components/Page/PageContentBodyConnector'; -import AddNewArtistSearchResultConnector from './Artist/AddNewArtistSearchResultConnector'; -import AddNewAlbumSearchResultConnector from './Album/AddNewAlbumSearchResultConnector'; +import AddNewAuthorSearchResultConnector from './Author/AddNewAuthorSearchResultConnector'; +import AddNewBookSearchResultConnector from './Book/AddNewBookSearchResultConnector'; import styles from './AddNewItem.css'; class AddNewItem extends Component { @@ -131,22 +131,22 @@ class AddNewItem extends Component {
{ items.map((item) => { - if (item.artist) { - const artist = item.artist; + if (item.author) { + const author = item.author; return ( - ); - } else if (item.album) { - const album = item.album; + } else if (item.book) { + const book = item.book; return ( - ); } diff --git a/frontend/src/Artist/Editor/Delete/DeleteArtistModal.js b/frontend/src/Search/Author/AddNewAuthorModal.js similarity index 68% rename from frontend/src/Artist/Editor/Delete/DeleteArtistModal.js rename to frontend/src/Search/Author/AddNewAuthorModal.js index 11fd79d5d..cec5be47a 100644 --- a/frontend/src/Artist/Editor/Delete/DeleteArtistModal.js +++ b/frontend/src/Search/Author/AddNewAuthorModal.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import DeleteArtistModalContentConnector from './DeleteArtistModalContentConnector'; +import AddNewAuthorModalContentConnector from './AddNewAuthorModalContentConnector'; -function DeleteArtistModal(props) { +function AddNewAuthorModal(props) { const { isOpen, onModalClose, @@ -15,7 +15,7 @@ function DeleteArtistModal(props) { isOpen={isOpen} onModalClose={onModalClose} > - @@ -23,9 +23,9 @@ function DeleteArtistModal(props) { ); } -DeleteArtistModal.propTypes = { +AddNewAuthorModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default DeleteArtistModal; +export default AddNewAuthorModal; diff --git a/frontend/src/Search/Artist/AddNewArtistModalContent.css b/frontend/src/Search/Author/AddNewAuthorModalContent.css similarity index 88% rename from frontend/src/Search/Artist/AddNewArtistModalContent.css rename to frontend/src/Search/Author/AddNewAuthorModalContent.css index dcc427693..a7dde074a 100644 --- a/frontend/src/Search/Artist/AddNewArtistModalContent.css +++ b/frontend/src/Search/Author/AddNewAuthorModalContent.css @@ -35,23 +35,23 @@ text-align: justify; } -.searchForMissingAlbumsLabelContainer { +.searchForMissingBooksLabelContainer { display: flex; margin-top: 2px; } -.searchForMissingAlbumsLabel { +.searchForMissingBooksLabel { margin-right: 8px; font-weight: normal; } -.searchForMissingAlbumsContainer { +.searchForMissingBooksContainer { composes: container from '~Components/Form/CheckInput.css'; flex: 0 1 0; } -.searchForMissingAlbumsInput { +.searchForMissingBooksInput { composes: input from '~Components/Form/CheckInput.css'; margin-top: 0; diff --git a/frontend/src/Search/Artist/AddNewArtistModalContent.js b/frontend/src/Search/Author/AddNewAuthorModalContent.js similarity index 68% rename from frontend/src/Search/Artist/AddNewArtistModalContent.js rename to frontend/src/Search/Author/AddNewAuthorModalContent.js index 088c9f80a..bb3dbde4e 100644 --- a/frontend/src/Search/Artist/AddNewArtistModalContent.js +++ b/frontend/src/Search/Author/AddNewAuthorModalContent.js @@ -8,11 +8,11 @@ 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 ArtistPoster from 'Artist/ArtistPoster'; -import AddArtistOptionsForm from '../Common/AddArtistOptionsForm.js'; -import styles from './AddNewArtistModalContent.css'; +import AuthorPoster from 'Author/AuthorPoster'; +import AddAuthorOptionsForm from '../Common/AddAuthorOptionsForm.js'; +import styles from './AddNewAuthorModalContent.css'; -class AddNewArtistModalContent extends Component { +class AddNewAuthorModalContent extends Component { // // Lifecycle @@ -21,19 +21,19 @@ class AddNewArtistModalContent extends Component { super(props, context); this.state = { - searchForMissingAlbums: false + searchForMissingBooks: false }; } // // Listeners - onSearchForMissingAlbumsChange = ({ value }) => { - this.setState({ searchForMissingAlbums: value }); + onSearchForMissingBooksChange = ({ value }) => { + this.setState({ searchForMissingBooks: value }); } - onAddArtistPress = () => { - this.props.onAddArtistPress(this.state.searchForMissingAlbums); + onAddAuthorPress = () => { + this.props.onAddAuthorPress(this.state.searchForMissingBooks); } // @@ -41,7 +41,7 @@ class AddNewArtistModalContent extends Component { render() { const { - artistName, + authorName, disambiguation, overview, images, @@ -54,7 +54,7 @@ class AddNewArtistModalContent extends Component { return ( - Add new Artist + Add new Author @@ -63,7 +63,7 @@ class AddNewArtistModalContent extends Component { isSmallScreen ? null:
-
- {artistName} + {authorName}
{ @@ -93,7 +93,7 @@ class AddNewArtistModalContent extends Component { null } - @@ -103,17 +103,17 @@ class AddNewArtistModalContent extends Component { - @@ -131,8 +131,8 @@ class AddNewArtistModalContent extends Component { } } -AddNewArtistModalContent.propTypes = { - artistName: PropTypes.string.isRequired, +AddNewAuthorModalContent.propTypes = { + authorName: PropTypes.string.isRequired, disambiguation: PropTypes.string.isRequired, overview: PropTypes.string, images: PropTypes.arrayOf(PropTypes.object).isRequired, @@ -140,7 +140,7 @@ AddNewArtistModalContent.propTypes = { addError: PropTypes.object, isSmallScreen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired, - onAddArtistPress: PropTypes.func.isRequired + onAddAuthorPress: PropTypes.func.isRequired }; -export default AddNewArtistModalContent; +export default AddNewAuthorModalContent; diff --git a/frontend/src/Search/Artist/AddNewArtistModalContentConnector.js b/frontend/src/Search/Author/AddNewAuthorModalContentConnector.js similarity index 78% rename from frontend/src/Search/Artist/AddNewArtistModalContentConnector.js rename to frontend/src/Search/Author/AddNewAuthorModalContentConnector.js index 979ef64c0..4907aaef5 100644 --- a/frontend/src/Search/Artist/AddNewArtistModalContentConnector.js +++ b/frontend/src/Search/Author/AddNewAuthorModalContentConnector.js @@ -2,10 +2,10 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { setAddDefault, addArtist } from 'Store/Actions/searchActions'; +import { setAddDefault, addAuthor } from 'Store/Actions/searchActions'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; import selectSettings from 'Store/Selectors/selectSettings'; -import AddNewArtistModalContent from './AddNewArtistModalContent'; +import AddNewAuthorModalContent from './AddNewAuthorModalContent'; function createMapStateToProps() { return createSelector( @@ -28,7 +28,7 @@ function createMapStateToProps() { return { isAdding, addError, - showMetadataProfile: metadataProfiles.items.length > 2, // NONE (not allowed for artists) and one other + showMetadataProfile: metadataProfiles.items.length > 2, // NONE (not allowed for authors) and one other isSmallScreen: dimensions.isSmallScreen, validationErrors, validationWarnings, @@ -40,10 +40,10 @@ function createMapStateToProps() { const mapDispatchToProps = { setAddDefault, - addArtist + addAuthor }; -class AddNewArtistModalContentConnector extends Component { +class AddNewAuthorModalContentConnector extends Component { // // Listeners @@ -52,7 +52,7 @@ class AddNewArtistModalContentConnector extends Component { this.props.setAddDefault({ [name]: value }); } - onAddArtistPress = (searchForMissingAlbums) => { + onAddAuthorPress = (searchForMissingBooks) => { const { foreignAuthorId, rootFolderPath, @@ -62,14 +62,14 @@ class AddNewArtistModalContentConnector extends Component { tags } = this.props; - this.props.addArtist({ + this.props.addAuthor({ foreignAuthorId, rootFolderPath: rootFolderPath.value, monitor: monitor.value, qualityProfileId: qualityProfileId.value, metadataProfileId: metadataProfileId.value, tags: tags.value, - searchForMissingAlbums + searchForMissingBooks }); } @@ -78,16 +78,16 @@ class AddNewArtistModalContentConnector extends Component { render() { return ( - ); } } -AddNewArtistModalContentConnector.propTypes = { +AddNewAuthorModalContentConnector.propTypes = { foreignAuthorId: PropTypes.string.isRequired, rootFolderPath: PropTypes.object, monitor: PropTypes.object.isRequired, @@ -96,7 +96,7 @@ AddNewArtistModalContentConnector.propTypes = { tags: PropTypes.object.isRequired, onModalClose: PropTypes.func.isRequired, setAddDefault: PropTypes.func.isRequired, - addArtist: PropTypes.func.isRequired + addAuthor: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(AddNewArtistModalContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(AddNewAuthorModalContentConnector); diff --git a/frontend/src/Search/Artist/AddNewArtistSearchResult.css b/frontend/src/Search/Author/AddNewAuthorSearchResult.css similarity index 100% rename from frontend/src/Search/Artist/AddNewArtistSearchResult.css rename to frontend/src/Search/Author/AddNewAuthorSearchResult.css diff --git a/frontend/src/Search/Artist/AddNewArtistSearchResult.js b/frontend/src/Search/Author/AddNewAuthorSearchResult.js similarity index 76% rename from frontend/src/Search/Artist/AddNewArtistSearchResult.js rename to frontend/src/Search/Author/AddNewAuthorSearchResult.js index 6c92dbe60..df837fe73 100644 --- a/frontend/src/Search/Artist/AddNewArtistSearchResult.js +++ b/frontend/src/Search/Author/AddNewAuthorSearchResult.js @@ -8,12 +8,12 @@ import HeartRating from 'Components/HeartRating'; import Icon from 'Components/Icon'; import Label from 'Components/Label'; import Link from 'Components/Link/Link'; -import ArtistPoster from 'Artist/ArtistPoster'; -import AddNewArtistModal from './AddNewArtistModal'; -import styles from './AddNewArtistSearchResult.css'; +import AuthorPoster from 'Author/AuthorPoster'; +import AddNewAuthorModal from './AddNewAuthorModal'; +import styles from './AddNewAuthorSearchResult.css'; -const columnPadding = parseInt(dimensions.artistIndexColumnPadding); -const columnPaddingSmallScreen = parseInt(dimensions.artistIndexColumnPaddingSmallScreen); +const columnPadding = parseInt(dimensions.authorIndexColumnPadding); +const columnPaddingSmallScreen = parseInt(dimensions.authorIndexColumnPaddingSmallScreen); const defaultFontSize = parseInt(fonts.defaultFontSize); const lineHeight = parseFloat(fonts.lineHeight); @@ -29,7 +29,7 @@ function calculateHeight(rowHeight, isSmallScreen) { return height; } -class AddNewArtistSearchResult extends Component { +class AddNewAuthorSearchResult extends Component { // // Lifecycle @@ -38,13 +38,13 @@ class AddNewArtistSearchResult extends Component { super(props, context); this.state = { - isNewAddArtistModalOpen: false + isNewAddAuthorModalOpen: false }; } componentDidUpdate(prevProps) { - if (!prevProps.isExistingArtist && this.props.isExistingArtist) { - this.onAddArtistModalClose(); + if (!prevProps.isExistingAuthor && this.props.isExistingAuthor) { + this.onAddAuthorModalClose(); } } @@ -52,11 +52,11 @@ class AddNewArtistSearchResult extends Component { // Listeners onPress = () => { - this.setState({ isNewAddArtistModalOpen: true }); + this.setState({ isNewAddAuthorModalOpen: true }); } - onAddArtistModalClose = () => { - this.setState({ isNewAddArtistModalOpen: false }); + onAddAuthorModalClose = () => { + this.setState({ isNewAddAuthorModalOpen: false }); } onMBLinkPress = (event) => { @@ -71,25 +71,25 @@ class AddNewArtistSearchResult extends Component { foreignAuthorId, goodreadsId, titleSlug, - artistName, + authorName, year, disambiguation, - artistType, + authorType, status, overview, ratings, images, - isExistingArtist, + isExistingAuthor, isSmallScreen } = this.props; const { - isNewAddArtistModalOpen + isNewAddAuthorModalOpen } = this.state; - const linkProps = isExistingArtist ? { to: `/author/${titleSlug}` } : { onPress: this.onPress }; + const linkProps = isExistingAuthor ? { to: `/author/${titleSlug}` } : { onPress: this.onPress }; - const endedString = artistType === 'Person' ? 'Deceased' : 'Ended'; + const endedString = authorType === 'Person' ? 'Deceased' : 'Ended'; const height = calculateHeight(230, isSmallScreen); @@ -104,7 +104,7 @@ class AddNewArtistSearchResult extends Component { { isSmallScreen ? null : -
- {artistName} + {authorName} { !name.contains(year) && year ? @@ -131,7 +131,7 @@ class AddNewArtistSearchResult extends Component { } { - isExistingArtist ? + isExistingAuthor ? { - artistType ? + authorType ? : null } @@ -197,35 +197,35 @@ class AddNewArtistSearchResult extends Component {
-
); } } -AddNewArtistSearchResult.propTypes = { +AddNewAuthorSearchResult.propTypes = { foreignAuthorId: PropTypes.string.isRequired, goodreadsId: PropTypes.number.isRequired, - titleSlug: PropTypes.number.isRequired, - artistName: PropTypes.string.isRequired, + titleSlug: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, year: PropTypes.number, disambiguation: PropTypes.string, - artistType: PropTypes.string, + authorType: PropTypes.string, status: PropTypes.string.isRequired, overview: PropTypes.string, ratings: PropTypes.object.isRequired, images: PropTypes.arrayOf(PropTypes.object).isRequired, - isExistingArtist: PropTypes.bool.isRequired, + isExistingAuthor: PropTypes.bool.isRequired, isSmallScreen: PropTypes.bool.isRequired }; -export default AddNewArtistSearchResult; +export default AddNewAuthorSearchResult; diff --git a/frontend/src/Search/Artist/AddNewArtistSearchResultConnector.js b/frontend/src/Search/Author/AddNewAuthorSearchResultConnector.js similarity index 52% rename from frontend/src/Search/Artist/AddNewArtistSearchResultConnector.js rename to frontend/src/Search/Author/AddNewAuthorSearchResultConnector.js index 45165c04d..28052c4a4 100644 --- a/frontend/src/Search/Artist/AddNewArtistSearchResultConnector.js +++ b/frontend/src/Search/Author/AddNewAuthorSearchResultConnector.js @@ -1,20 +1,20 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import createExistingArtistSelector from 'Store/Selectors/createExistingArtistSelector'; +import createExistingAuthorSelector from 'Store/Selectors/createExistingAuthorSelector'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; -import AddNewArtistSearchResult from './AddNewArtistSearchResult'; +import AddNewAuthorSearchResult from './AddNewAuthorSearchResult'; function createMapStateToProps() { return createSelector( - createExistingArtistSelector(), + createExistingAuthorSelector(), createDimensionsSelector(), - (isExistingArtist, dimensions) => { + (isExistingAuthor, dimensions) => { return { - isExistingArtist, + isExistingAuthor, isSmallScreen: dimensions.isSmallScreen }; } ); } -export default connect(createMapStateToProps)(AddNewArtistSearchResult); +export default connect(createMapStateToProps)(AddNewAuthorSearchResult); diff --git a/frontend/src/Search/Album/AddNewAlbumModal.js b/frontend/src/Search/Book/AddNewBookModal.js similarity index 66% rename from frontend/src/Search/Album/AddNewAlbumModal.js rename to frontend/src/Search/Book/AddNewBookModal.js index 7f1d678a9..99197544b 100644 --- a/frontend/src/Search/Album/AddNewAlbumModal.js +++ b/frontend/src/Search/Book/AddNewBookModal.js @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; -import AddNewAlbumModalContentConnector from './AddNewAlbumModalContentConnector'; +import AddNewBookModalContentConnector from './AddNewBookModalContentConnector'; -function AddNewAlbumModal(props) { +function AddNewBookModal(props) { const { isOpen, onModalClose, @@ -15,7 +15,7 @@ function AddNewAlbumModal(props) { isOpen={isOpen} onModalClose={onModalClose} > - @@ -23,9 +23,9 @@ function AddNewAlbumModal(props) { ); } -AddNewAlbumModal.propTypes = { +AddNewBookModal.propTypes = { isOpen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired }; -export default AddNewAlbumModal; +export default AddNewBookModal; diff --git a/frontend/src/Search/Album/AddNewAlbumModalContent.css b/frontend/src/Search/Book/AddNewBookModalContent.css similarity index 90% rename from frontend/src/Search/Album/AddNewAlbumModalContent.css rename to frontend/src/Search/Book/AddNewBookModalContent.css index d1d6bb24d..cf5fbbb88 100644 --- a/frontend/src/Search/Album/AddNewAlbumModalContent.css +++ b/frontend/src/Search/Book/AddNewBookModalContent.css @@ -17,7 +17,7 @@ font-size: 36px; } -.artistName { +.authorName { margin-bottom: 20px; font-weight: 300; font-size: 20px; @@ -53,7 +53,7 @@ flex: 0 1 300px; } -.albumType { +.bookType { margin-bottom: 20px; border: 1px solid $borderColor; border-radius: 4px; @@ -64,12 +64,12 @@ } } -.albumTypeLabel { +.bookTypeLabel { margin-right: 5px; margin-left: 5px; } -.albumCount { +.bookCount { color: #8895aa; font-style: italic; font-size: 18px; @@ -83,23 +83,23 @@ text-align: center; } -.searchForNewAlbumLabelContainer { +.searchForNewBookLabelContainer { display: flex; margin-top: 2px; } -.searchForNewAlbumLabel { +.searchForNewBookLabel { margin-right: 8px; font-weight: normal; } -.searchForNewAlbumContainer { +.searchForNewBookContainer { composes: container from '~Components/Form/CheckInput.css'; flex: 0 1 0; } -.searchForNewAlbumInput { +.searchForNewBookInput { composes: input from '~Components/Form/CheckInput.css'; margin-top: 0; diff --git a/frontend/src/Search/Album/AddNewAlbumModalContent.js b/frontend/src/Search/Book/AddNewBookModalContent.js similarity index 65% rename from frontend/src/Search/Album/AddNewAlbumModalContent.js rename to frontend/src/Search/Book/AddNewBookModalContent.js index 00f439389..8a612c10b 100644 --- a/frontend/src/Search/Album/AddNewAlbumModalContent.js +++ b/frontend/src/Search/Book/AddNewBookModalContent.js @@ -8,11 +8,11 @@ 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 AlbumCover from 'Album/AlbumCover'; -import AddArtistOptionsForm from '../Common/AddArtistOptionsForm.js'; -import styles from './AddNewAlbumModalContent.css'; +import BookCover from 'Book/BookCover'; +import AddAuthorOptionsForm from '../Common/AddAuthorOptionsForm.js'; +import styles from './AddNewBookModalContent.css'; -class AddNewAlbumModalContent extends Component { +class AddNewBookModalContent extends Component { // // Lifecycle @@ -21,19 +21,19 @@ class AddNewAlbumModalContent extends Component { super(props, context); this.state = { - searchForNewAlbum: false + searchForNewBook: false }; } // // Listeners - onSearchForNewAlbumChange = ({ value }) => { - this.setState({ searchForNewAlbum: value }); + onSearchForNewBookChange = ({ value }) => { + this.setState({ searchForNewBook: value }); } - onAddAlbumPress = () => { - this.props.onAddAlbumPress(this.state.searchForNewAlbum); + onAddBookPress = () => { + this.props.onAddBookPress(this.state.searchForNewBook); } // @@ -41,13 +41,13 @@ class AddNewAlbumModalContent extends Component { render() { const { - albumTitle, - artistName, + bookTitle, + authorName, disambiguation, overview, images, isAdding, - isExistingArtist, + isExistingAuthor, isSmallScreen, onModalClose, ...otherProps @@ -56,7 +56,7 @@ class AddNewAlbumModalContent extends Component { return ( - Add new Album + Add new Book @@ -65,7 +65,7 @@ class AddNewAlbumModalContent extends Component { isSmallScreen ? null:
-
- {albumTitle} + {bookTitle}
{ @@ -84,7 +84,7 @@ class AddNewAlbumModalContent extends Component { }
- By: {artistName} + By: {authorName}
{ @@ -100,9 +100,9 @@ class AddNewAlbumModalContent extends Component { } { - !isExistingArtist && - @@ -112,17 +112,17 @@ class AddNewAlbumModalContent extends Component { - @@ -140,18 +140,18 @@ class AddNewAlbumModalContent extends Component { } } -AddNewAlbumModalContent.propTypes = { - albumTitle: PropTypes.string.isRequired, - artistName: PropTypes.string.isRequired, +AddNewBookModalContent.propTypes = { + bookTitle: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, disambiguation: PropTypes.string.isRequired, overview: PropTypes.string, images: PropTypes.arrayOf(PropTypes.object).isRequired, isAdding: PropTypes.bool.isRequired, addError: PropTypes.object, - isExistingArtist: PropTypes.bool.isRequired, + isExistingAuthor: PropTypes.bool.isRequired, isSmallScreen: PropTypes.bool.isRequired, onModalClose: PropTypes.func.isRequired, - onAddAlbumPress: PropTypes.func.isRequired + onAddBookPress: PropTypes.func.isRequired }; -export default AddNewAlbumModalContent; +export default AddNewBookModalContent; diff --git a/frontend/src/Search/Album/AddNewAlbumModalContentConnector.js b/frontend/src/Search/Book/AddNewBookModalContentConnector.js similarity index 79% rename from frontend/src/Search/Album/AddNewAlbumModalContentConnector.js rename to frontend/src/Search/Book/AddNewBookModalContentConnector.js index 67ef5369f..3ede2d752 100644 --- a/frontend/src/Search/Album/AddNewAlbumModalContentConnector.js +++ b/frontend/src/Search/Book/AddNewBookModalContentConnector.js @@ -3,18 +3,18 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { metadataProfileNames } from 'Helpers/Props'; -import { setAddDefault, addAlbum } from 'Store/Actions/searchActions'; +import { setAddDefault, addBook } from 'Store/Actions/searchActions'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; import selectSettings from 'Store/Selectors/selectSettings'; -import AddNewAlbumModalContent from './AddNewAlbumModalContent'; +import AddNewBookModalContent from './AddNewBookModalContent'; function createMapStateToProps() { return createSelector( - (state, { isExistingArtist }) => isExistingArtist, + (state, { isExistingAuthor }) => isExistingAuthor, (state) => state.search, (state) => state.settings.metadataProfiles, createDimensionsSelector(), - (isExistingArtist, searchState, metadataProfiles, dimensions) => { + (isExistingAuthor, searchState, metadataProfiles, dimensions) => { const { isAdding, addError, @@ -27,7 +27,7 @@ function createMapStateToProps() { validationWarnings } = selectSettings(defaults, {}, addError); - // For adding single albums, default to None profile + // For adding single books, default to None profile const noneProfile = metadataProfiles.items.find((item) => item.name === metadataProfileNames.NONE); return { @@ -46,10 +46,10 @@ function createMapStateToProps() { const mapDispatchToProps = { setAddDefault, - addAlbum + addBook }; -class AddNewAlbumModalContentConnector extends Component { +class AddNewBookModalContentConnector extends Component { // // Lifecycle @@ -80,7 +80,7 @@ class AddNewAlbumModalContentConnector extends Component { this.props.setAddDefault({ [name]: value }); } - onAddAlbumPress = (searchForNewAlbum) => { + onAddBookPress = (searchForNewBook) => { const { foreignBookId, rootFolderPath, @@ -90,14 +90,14 @@ class AddNewAlbumModalContentConnector extends Component { tags } = this.props; - this.props.addAlbum({ + this.props.addBook({ foreignBookId, rootFolderPath: rootFolderPath.value, monitor: monitor.value, qualityProfileId: qualityProfileId.value, metadataProfileId: metadataProfileId.value, tags: tags.value, - searchForNewAlbum + searchForNewBook }); } @@ -106,17 +106,17 @@ class AddNewAlbumModalContentConnector extends Component { render() { return ( - ); } } -AddNewAlbumModalContentConnector.propTypes = { - isExistingArtist: PropTypes.bool.isRequired, +AddNewBookModalContentConnector.propTypes = { + isExistingAuthor: PropTypes.bool.isRequired, foreignBookId: PropTypes.string.isRequired, rootFolderPath: PropTypes.object, monitor: PropTypes.object.isRequired, @@ -126,7 +126,7 @@ AddNewAlbumModalContentConnector.propTypes = { tags: PropTypes.object.isRequired, onModalClose: PropTypes.func.isRequired, setAddDefault: PropTypes.func.isRequired, - addAlbum: PropTypes.func.isRequired + addBook: PropTypes.func.isRequired }; -export default connect(createMapStateToProps, mapDispatchToProps)(AddNewAlbumModalContentConnector); +export default connect(createMapStateToProps, mapDispatchToProps)(AddNewBookModalContentConnector); diff --git a/frontend/src/Search/Album/AddNewAlbumSearchResult.css b/frontend/src/Search/Book/AddNewBookSearchResult.css similarity index 98% rename from frontend/src/Search/Album/AddNewAlbumSearchResult.css rename to frontend/src/Search/Book/AddNewBookSearchResult.css index 719919488..d28edcac5 100644 --- a/frontend/src/Search/Album/AddNewAlbumSearchResult.css +++ b/frontend/src/Search/Book/AddNewBookSearchResult.css @@ -42,7 +42,7 @@ font-size: 36px; } -.artistName { +.authorName { font-weight: 300; font-size: 20px; } diff --git a/frontend/src/Search/Album/AddNewAlbumSearchResult.js b/frontend/src/Search/Book/AddNewBookSearchResult.js similarity index 73% rename from frontend/src/Search/Album/AddNewAlbumSearchResult.js rename to frontend/src/Search/Book/AddNewBookSearchResult.js index 18736488e..ad7be4357 100644 --- a/frontend/src/Search/Album/AddNewAlbumSearchResult.js +++ b/frontend/src/Search/Book/AddNewBookSearchResult.js @@ -9,12 +9,12 @@ import HeartRating from 'Components/HeartRating'; import Icon from 'Components/Icon'; import Label from 'Components/Label'; import Link from 'Components/Link/Link'; -import AlbumCover from 'Album/AlbumCover'; -import AddNewAlbumModal from './AddNewAlbumModal'; -import styles from './AddNewAlbumSearchResult.css'; +import BookCover from 'Book/BookCover'; +import AddNewBookModal from './AddNewBookModal'; +import styles from './AddNewBookSearchResult.css'; -const columnPadding = parseInt(dimensions.artistIndexColumnPadding); -const columnPaddingSmallScreen = parseInt(dimensions.artistIndexColumnPaddingSmallScreen); +const columnPadding = parseInt(dimensions.authorIndexColumnPadding); +const columnPaddingSmallScreen = parseInt(dimensions.authorIndexColumnPaddingSmallScreen); const defaultFontSize = parseInt(fonts.defaultFontSize); const lineHeight = parseFloat(fonts.lineHeight); @@ -30,7 +30,7 @@ function calculateHeight(rowHeight, isSmallScreen) { return height; } -class AddNewAlbumSearchResult extends Component { +class AddNewBookSearchResult extends Component { // // Lifecycle @@ -39,13 +39,13 @@ class AddNewAlbumSearchResult extends Component { super(props, context); this.state = { - isNewAddAlbumModalOpen: false + isNewAddBookModalOpen: false }; } componentDidUpdate(prevProps) { - if (!prevProps.isExistingAlbum && this.props.isExistingAlbum) { - this.onAddAlbumModalClose(); + if (!prevProps.isExistingBook && this.props.isExistingBook) { + this.onAddBookModalClose(); } } @@ -53,11 +53,11 @@ class AddNewAlbumSearchResult extends Component { // Listeners onPress = () => { - this.setState({ isNewAddAlbumModalOpen: true }); + this.setState({ isNewAddBookModalOpen: true }); } - onAddAlbumModalClose = () => { - this.setState({ isNewAddAlbumModalOpen: false }); + onAddBookModalClose = () => { + this.setState({ isNewAddBookModalOpen: false }); } onMBLinkPress = (event) => { @@ -78,17 +78,17 @@ class AddNewAlbumSearchResult extends Component { overview, ratings, images, - artist, - isExistingAlbum, - isExistingArtist, + author, + isExistingBook, + isExistingAuthor, isSmallScreen } = this.props; const { - isNewAddAlbumModalOpen + isNewAddBookModalOpen } = this.state; - const linkProps = isExistingAlbum ? { to: `/book/${titleSlug}` } : { onPress: this.onPress }; + const linkProps = isExistingBook ? { to: `/book/${titleSlug}` } : { onPress: this.onPress }; const height = calculateHeight(230, isSmallScreen); @@ -102,7 +102,7 @@ class AddNewAlbumSearchResult extends Component {
{ !isSmallScreen && - : null } @@ -145,15 +145,15 @@ class AddNewAlbumSearchResult extends Component {
- By: {artist.artistName} + By: {author.authorName} { - isExistingArtist ? + isExistingAuthor ? : null } @@ -191,23 +191,23 @@ class AddNewAlbumSearchResult extends Component {
-
); } } -AddNewAlbumSearchResult.propTypes = { +AddNewBookSearchResult.propTypes = { foreignBookId: PropTypes.string.isRequired, goodreadsId: PropTypes.number.isRequired, titleSlug: PropTypes.string.isRequired, @@ -216,11 +216,11 @@ AddNewAlbumSearchResult.propTypes = { disambiguation: PropTypes.string, overview: PropTypes.string, ratings: PropTypes.object.isRequired, - artist: PropTypes.object, + author: PropTypes.object, images: PropTypes.arrayOf(PropTypes.object).isRequired, - isExistingAlbum: PropTypes.bool.isRequired, - isExistingArtist: PropTypes.bool.isRequired, + isExistingBook: PropTypes.bool.isRequired, + isExistingAuthor: PropTypes.bool.isRequired, isSmallScreen: PropTypes.bool.isRequired }; -export default AddNewAlbumSearchResult; +export default AddNewBookSearchResult; diff --git a/frontend/src/Search/Album/AddNewAlbumSearchResultConnector.js b/frontend/src/Search/Book/AddNewBookSearchResultConnector.js similarity index 72% rename from frontend/src/Search/Album/AddNewAlbumSearchResultConnector.js rename to frontend/src/Search/Book/AddNewBookSearchResultConnector.js index 626e32c94..618f1f022 100644 --- a/frontend/src/Search/Album/AddNewAlbumSearchResultConnector.js +++ b/frontend/src/Search/Book/AddNewBookSearchResultConnector.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createDimensionsSelector from 'Store/Selectors/createDimensionsSelector'; -import AddNewAlbumSearchResult from './AddNewAlbumSearchResult'; +import AddNewBookSearchResult from './AddNewBookSearchResult'; function createMapStateToProps() { return createSelector( @@ -14,4 +14,4 @@ function createMapStateToProps() { ); } -export default connect(createMapStateToProps)(AddNewAlbumSearchResult); +export default connect(createMapStateToProps)(AddNewBookSearchResult); diff --git a/frontend/src/Search/Common/AddArtistOptionsForm.css b/frontend/src/Search/Common/AddAuthorOptionsForm.css similarity index 100% rename from frontend/src/Search/Common/AddArtistOptionsForm.css rename to frontend/src/Search/Common/AddAuthorOptionsForm.css diff --git a/frontend/src/Search/Common/AddArtistOptionsForm.js b/frontend/src/Search/Common/AddAuthorOptionsForm.js similarity index 86% rename from frontend/src/Search/Common/AddArtistOptionsForm.js rename to frontend/src/Search/Common/AddAuthorOptionsForm.js index 3d5b693f8..e35a56d94 100644 --- a/frontend/src/Search/Common/AddArtistOptionsForm.js +++ b/frontend/src/Search/Common/AddAuthorOptionsForm.js @@ -7,11 +7,11 @@ import FormLabel from 'Components/Form/FormLabel'; import FormInputGroup from 'Components/Form/FormInputGroup'; import Icon from 'Components/Icon'; import Popover from 'Components/Tooltip/Popover'; -import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent'; -import ArtistMetadataProfilePopoverContent from 'AddArtist/ArtistMetadataProfilePopoverContent'; -import styles from './AddArtistOptionsForm.css'; +import AuthorMonitoringOptionsPopoverContent from 'AddAuthor/AuthorMonitoringOptionsPopoverContent'; +import AuthorMetadataProfilePopoverContent from 'AddAuthor/AuthorMetadataProfilePopoverContent'; +import styles from './AddAuthorOptionsForm.css'; -class AddArtistOptionsForm extends Component { +class AddAuthorOptionsForm extends Component { // // Listeners @@ -65,13 +65,13 @@ class AddArtistOptionsForm extends Component { /> } title="Monitoring Options" - body={} + body={} position={tooltipPositions.RIGHT} /> } title="Metadata Profile" - body={} + body={} position={tooltipPositions.RIGHT} /> } @@ -133,7 +133,7 @@ class AddArtistOptionsForm extends Component { } } -AddArtistOptionsForm.propTypes = { +AddAuthorOptionsForm.propTypes = { rootFolderPath: PropTypes.object, monitor: PropTypes.object.isRequired, qualityProfileId: PropTypes.object, @@ -144,4 +144,4 @@ AddArtistOptionsForm.propTypes = { onInputChange: PropTypes.func.isRequired }; -export default AddArtistOptionsForm; +export default AddAuthorOptionsForm; diff --git a/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContent.js b/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContent.js index 5aa9d269b..12df1866d 100644 --- a/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContent.js +++ b/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContent.js @@ -31,7 +31,7 @@ function EditImportListExclusionModalContent(props) { } = props; const { - artistName, + authorName, foreignId } = item; @@ -62,9 +62,9 @@ function EditImportListExclusionModalContent(props) { @@ -75,7 +75,7 @@ function EditImportListExclusionModalContent(props) { @@ -115,7 +115,7 @@ function EditImportListExclusionModalContent(props) { } const ImportListExclusionShape = { - artistName: PropTypes.shape(stringSettingShape).isRequired, + authorName: PropTypes.shape(stringSettingShape).isRequired, foreignId: PropTypes.shape(stringSettingShape).isRequired }; diff --git a/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContentConnector.js b/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContentConnector.js index 2516ca25b..63450acb3 100644 --- a/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContentConnector.js +++ b/frontend/src/Settings/ImportLists/ImportListExclusions/EditImportListExclusionModalContentConnector.js @@ -8,7 +8,7 @@ import { setImportListExclusionValue, saveImportListExclusion } from 'Store/Acti import EditImportListExclusionModalContent from './EditImportListExclusionModalContent'; const newImportListExclusion = { - artistName: '', + authorName: '', foreignId: '' }; diff --git a/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.css b/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.css index 4c274831c..e25605378 100644 --- a/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.css +++ b/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.css @@ -7,7 +7,7 @@ line-height: 30px; } -.artistName { +.authorName { flex: 0 0 300px; } diff --git a/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.js b/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.js index 4a4d97c78..090af0a7f 100644 --- a/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.js +++ b/frontend/src/Settings/ImportLists/ImportListExclusions/ImportListExclusion.js @@ -54,7 +54,7 @@ class ImportListExclusion extends Component { render() { const { id, - artistName, + authorName, foreignId } = this.props; @@ -64,7 +64,7 @@ class ImportListExclusion extends Component { styles.importListExclusion )} > -
{artistName}
+
{authorName}
{foreignId}
@@ -98,7 +98,7 @@ class ImportListExclusion extends Component { ImportListExclusion.propTypes = { id: PropTypes.number.isRequired, - artistName: PropTypes.string.isRequired, + authorName: PropTypes.string.isRequired, foreignId: PropTypes.string.isRequired, onConfirmDeleteImportListExclusion: PropTypes.func.isRequired }; diff --git a/frontend/src/Settings/ImportLists/ImportLists/AddImportListModalContent.js b/frontend/src/Settings/ImportLists/ImportLists/AddImportListModalContent.js index d5879d043..f70504128 100644 --- a/frontend/src/Settings/ImportLists/ImportLists/AddImportListModalContent.js +++ b/frontend/src/Settings/ImportLists/ImportLists/AddImportListModalContent.js @@ -50,7 +50,7 @@ class AddImportListModalContent extends Component {
-
Readarr supports multiple lists for importing Albums and Artists into the database.
+
Readarr supports multiple lists for importing Books and Authors into the database.
For more information on the individual lists, click on the info buttons.
{ diff --git a/frontend/src/Settings/ImportLists/ImportLists/EditImportListModalContent.js b/frontend/src/Settings/ImportLists/ImportLists/EditImportListModalContent.js index 462d87a7d..f107aa123 100644 --- a/frontend/src/Settings/ImportLists/ImportLists/EditImportListModalContent.js +++ b/frontend/src/Settings/ImportLists/ImportLists/EditImportListModalContent.js @@ -44,8 +44,8 @@ function EditImportListModalContent(props) { const monitorOptions = [ { key: 'none', value: 'None' }, - { key: 'specificAlbum', value: 'Specific Book' }, - { key: 'entireArtist', value: 'All Author Books' } + { key: 'specificBook', value: 'Specific Book' }, + { key: 'entireAuthor', value: 'All Author Books' } ]; const { diff --git a/frontend/src/Settings/MediaManagement/MediaManagement.js b/frontend/src/Settings/MediaManagement/MediaManagement.js index 8039512d7..18b41913c 100644 --- a/frontend/src/Settings/MediaManagement/MediaManagement.js +++ b/frontend/src/Settings/MediaManagement/MediaManagement.js @@ -34,7 +34,7 @@ const downloadPropersAndRepacksOptions = [ const fileDateOptions = [ { key: 'none', value: 'None' }, - { key: 'albumReleaseDate', value: 'Album Release Date' } + { key: 'bookReleaseDate', value: 'Book Release Date' } ]; class MediaManagement extends Component { @@ -96,14 +96,14 @@ class MediaManagement extends Component { isAdvanced={true} size={sizes.MEDIUM} > - Create empty artist folders + Create empty author folders @@ -117,7 +117,7 @@ class MediaManagement extends Component { @@ -142,7 +142,7 @@ class MediaManagement extends Component { @@ -189,7 +189,7 @@ class MediaManagement extends Component { @@ -222,14 +222,14 @@ class MediaManagement extends Component { legend="File Management" > - Ignore Deleted Tracks + Ignore Deleted Books @@ -278,12 +278,12 @@ class MediaManagement extends Component { advancedSettings={advancedSettings} isAdvanced={true} > - Rescan Artist Folder after Refresh + Rescan Author Folder after Refresh @@ -403,7 +403,7 @@ class MediaManagement extends Component { +
{ isFetching && @@ -110,7 +109,7 @@ class Naming extends Component { hasSettings && !isFetching && !error && - Rename Tracks + Rename Books - Artist Folder Format + Author Folder Format ?} onChange={onInputChange} {...settings.authorFolderFormat} - helpTexts={['Used when adding a new artist or moving an author via the author editor', ...authorFolderFormatHelpTexts]} + helpTexts={['Used when adding a new author or moving an author via the author editor', ...authorFolderFormatHelpTexts]} errors={[...authorFolderFormatErrors, ...settings.authorFolderFormat.errors]} /> diff --git a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js index 1360c4e10..3fe6d7569 100644 --- a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js +++ b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js @@ -28,16 +28,16 @@ const caseOptions = [ const fileNameTokens = [ { - token: '{Author Name} - {Book Title} - {track:00} - {Track Title} {Quality Full}', - example: 'Author Name - Book Title - 01 - Track Title MP3-320 Proper' + token: '{Author Name} - {Book Title} - {Quality Full}', + example: 'Author Name - Book Title - MP3-320 Proper' }, { - token: '{Author.Name}.{Book.Title}.{track:00}.{TrackClean.Title}.{Quality.Full}', - example: 'Author.Name.Book.Title.01.Track.Title.MP3-320' + token: '{Author.Name}.{Book.Title}.{Quality.Full}', + example: 'Author.Name.Book.Title.MP3-320' } ]; -const artistTokens = [ +const authorTokens = [ { token: '{Author Name}', example: 'Author Name' }, { token: '{Author NameThe}', example: 'Author Name, The' }, @@ -47,7 +47,7 @@ const artistTokens = [ { token: '{Author Disambiguation}', example: 'Disambiguation' } ]; -const albumTokens = [ +const bookTokens = [ { token: '{Book Title}', example: 'Book Title' }, { token: '{Book TitleThe}', example: 'Book Title, The' }, @@ -68,20 +68,10 @@ const mediumFormatTokens = [ { token: '{Medium Format}', example: 'CD' } ]; -const trackTokens = [ - { token: '{track:0}', example: '1' }, - { token: '{track:00}', example: '01' } -]; - const releaseDateTokens = [ { token: '{Release Year}', example: '2016' } ]; -const trackTitleTokens = [ - { token: '{Track Title}', example: 'Track Title' }, - { token: '{Track CleanTitle}', example: 'Track Title' } -]; - const qualityTokens = [ { token: '{Quality Full}', example: 'FLAC Proper' }, { token: '{Quality Title}', example: 'FLAC' } @@ -102,7 +92,7 @@ const otherTokens = [ const originalTokens = [ { token: '{Original Title}', example: 'Author.Name.Book.Name.2018.FLAC-EVOLVE' }, - { token: '{Original Filename}', example: '01 - track name' } + { token: '{Original Filename}', example: '01 - book name' } ]; class NamingModal extends Component { @@ -175,8 +165,7 @@ class NamingModal extends Component { value, isOpen, advancedSettings, - album, - track, + book, additional, onInputChange, onModalClose @@ -246,7 +235,7 @@ class NamingModal extends Component {
{ - artistTokens.map(({ token, example }) => { + authorTokens.map(({ token, example }) => { return ( { - album && + book &&
{ - albumTokens.map(({ token, example }) => { + bookTokens.map(({ token, example }) => { return (
@@ -361,56 +350,12 @@ class NamingModal extends Component {
-
-
- { - trackTokens.map(({ token, example }) => { - return ( - - ); - } - ) - } -
-
-
} { additional &&
-
-
- { - trackTitleTokens.map(({ token, example }) => { - return ( - - ); - } - ) - } -
-
-
{ @@ -525,16 +470,14 @@ NamingModal.propTypes = { value: PropTypes.string.isRequired, isOpen: PropTypes.bool.isRequired, advancedSettings: PropTypes.bool.isRequired, - album: PropTypes.bool.isRequired, - track: PropTypes.bool.isRequired, + book: PropTypes.bool.isRequired, additional: PropTypes.bool.isRequired, onInputChange: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; NamingModal.defaultProps = { - album: false, - track: false, + book: false, additional: false }; diff --git a/frontend/src/Settings/MediaManagement/RootFolder/EditRootFolderModalContent.js b/frontend/src/Settings/MediaManagement/RootFolder/EditRootFolderModalContent.js index 5bea4c87c..7b64c468b 100644 --- a/frontend/src/Settings/MediaManagement/RootFolder/EditRootFolderModalContent.js +++ b/frontend/src/Settings/MediaManagement/RootFolder/EditRootFolderModalContent.js @@ -14,8 +14,8 @@ import FormGroup from 'Components/Form/FormGroup'; import FormLabel from 'Components/Form/FormLabel'; import FormInputGroup from 'Components/Form/FormInputGroup'; import Popover from 'Components/Tooltip/Popover'; -import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent'; -import ArtistMetadataProfilePopoverContent from 'AddArtist/ArtistMetadataProfilePopoverContent'; +import AuthorMonitoringOptionsPopoverContent from 'AddAuthor/AuthorMonitoringOptionsPopoverContent'; +import AuthorMetadataProfilePopoverContent from 'AddAuthor/AuthorMetadataProfilePopoverContent'; import styles from './EditRootFolderModalContent.css'; function EditRootFolderModalContent(props) { @@ -227,13 +227,13 @@ function EditRootFolderModalContent(props) { /> } title="Monitoring Options" - body={} + body={} position={tooltipPositions.RIGHT} /> } title="Metadata Profile" - body={} + body={} position={tooltipPositions.RIGHT} /> diff --git a/frontend/src/Settings/Notifications/Notifications/EditNotificationModalContent.js b/frontend/src/Settings/Notifications/Notifications/EditNotificationModalContent.js index c328b77d8..08f228922 100644 --- a/frontend/src/Settings/Notifications/Notifications/EditNotificationModalContent.js +++ b/frontend/src/Settings/Notifications/Notifications/EditNotificationModalContent.js @@ -96,7 +96,7 @@ function EditNotificationModalContent(props) { diff --git a/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js b/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js index 432d5fdb7..c239acde6 100644 --- a/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js +++ b/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js @@ -110,7 +110,7 @@ function EditDelayProfileModalContent(props) { { id === 1 ? - This is the default profile. It applies to all artist that don't have an explicit profile. + This is the default profile. It applies to all author that don't have an explicit profile. : @@ -120,7 +120,7 @@ function EditDelayProfileModalContent(props) { type={inputTypes.TAG} name="tags" {...tags} - helpText="Applies to artist with at least one matching tag" + helpText="Applies to author with at least one matching tag" onChange={onInputChange} /> diff --git a/frontend/src/Settings/Profiles/Metadata/EditMetadataProfileModalContent.js b/frontend/src/Settings/Profiles/Metadata/EditMetadataProfileModalContent.js index 1e6ec83de..c486ce8f6 100644 --- a/frontend/src/Settings/Profiles/Metadata/EditMetadataProfileModalContent.js +++ b/frontend/src/Settings/Profiles/Metadata/EditMetadataProfileModalContent.js @@ -161,7 +161,7 @@ function EditMetadataProfileModalContent(props) { id &&