From 5286b533347477ae47d4e56f086285019e8095c1 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 29 Apr 2023 16:26:56 -0500 Subject: [PATCH 01/39] Add:Progress bar on series covers #1734 --- client/components/cards/LazySeriesCard.vue | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/client/components/cards/LazySeriesCard.vue b/client/components/cards/LazySeriesCard.vue index 313530b6..1175acf1 100644 --- a/client/components/cards/LazySeriesCard.vue +++ b/client/components/cards/LazySeriesCard.vue @@ -7,7 +7,7 @@
{{ books.length }}
-
+

{{ displayTitle }}

@@ -85,13 +85,13 @@ export default { case 'addedAt': return `${this.$strings.LabelAdded} ${this.$formatDate(this.addedAt, this.dateFormat)}` case 'totalDuration': - return `${this.$strings.LabelDuration} ${this.$elapsedPrettyExtended(this.totalDuration, false)}` + return `${this.$strings.LabelDuration} ${this.$elapsedPrettyExtended(this.totalDuration, false)}` case 'lastBookUpdated': - const lastUpdated = Math.max(...(this.books).map(x => x.updatedAt), 0) + const lastUpdated = Math.max(...this.books.map((x) => x.updatedAt), 0) return `${this.$strings.LabelLastBookUpdated} ${this.$formatDate(lastUpdated, this.dateFormat)}` case 'lastBookAdded': - const lastBookAdded = Math.max(...(this.books).map(x => x.addedAt), 0) - return `${this.$strings.LabelLastBookAdded} ${this.$formatDate(lastBookAdded, this.dateFormat)}` + const lastBookAdded = Math.max(...this.books.map((x) => x.addedAt), 0) + return `${this.$strings.LabelLastBookAdded} ${this.$formatDate(lastBookAdded, this.dateFormat)}` default: return null } @@ -115,6 +115,14 @@ export default { seriesBooksFinished() { return this.seriesBookProgress.filter((p) => p.isFinished) }, + hasSeriesBookInProgress() { + return this.seriesBookProgress.some((p) => !p.isFinished && p.progress > 0) + }, + seriesPercentInProgress() { + let totalFinishedAndInProgress = this.seriesBooksFinished.length + if (this.hasSeriesBookInProgress) totalFinishedAndInProgress += 1 + return Math.min(1, Math.max(0, totalFinishedAndInProgress / this.books.length)) + }, isSeriesFinished() { return this.books.length === this.seriesBooksFinished.length }, From 604a6715495911e5f36f051b821b2109287636b7 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 30 Apr 2023 09:41:49 -0500 Subject: [PATCH 02/39] Update:Show tags and podcast type on library item page --- .../components/content/LibraryItemDetails.vue | 201 ++++++++++++++++++ client/pages/item/_id/index.vue | 126 +---------- 2 files changed, 202 insertions(+), 125 deletions(-) create mode 100644 client/components/content/LibraryItemDetails.vue diff --git a/client/components/content/LibraryItemDetails.vue b/client/components/content/LibraryItemDetails.vue new file mode 100644 index 00000000..9b9d6b0c --- /dev/null +++ b/client/components/content/LibraryItemDetails.vue @@ -0,0 +1,201 @@ + + + \ No newline at end of file diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index f03d2516..8fb1837f 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -47,84 +47,7 @@

by Unknown

-
-
- {{ $strings.LabelNarrators }} -
-
- -
-
-
-
- {{ $strings.LabelPublishYear }} -
-
- {{ publishedYear }} -
-
-
-
- Album -
-
- {{ musicAlbum }} -
-
-
-
- Album Artist -
-
- {{ musicAlbumArtist }} -
-
-
-
- Track -
-
- {{ musicTrackPretty }} -
-
-
-
- Disc -
-
- {{ musicDiscPretty }} -
-
-
-
- {{ $strings.LabelGenres }} -
-
- -
-
-
-
- {{ $strings.LabelDuration }} -
-
- {{ durationPretty }} -
-
-
-
- {{ $strings.LabelSize }} -
-
- {{ sizePretty }} -
-
+
@@ -339,9 +262,6 @@ export default { libraryId() { return this.libraryItem.libraryId }, - folderId() { - return this.libraryItem.folderId - }, libraryItemId() { return this.libraryItem.id }, @@ -367,19 +287,10 @@ export default { title() { return this.mediaMetadata.title || 'No Title' }, - publishedYear() { - return this.mediaMetadata.publishedYear - }, - narrator() { - return this.mediaMetadata.narratorName - }, bookSubtitle() { if (this.isPodcast) return null return this.mediaMetadata.subtitle }, - genres() { - return this.mediaMetadata.genres || [] - }, podcastAuthor() { return this.mediaMetadata.author || '' }, @@ -389,25 +300,6 @@ export default { musicArtists() { return this.mediaMetadata.artists || [] }, - musicAlbum() { - return this.mediaMetadata.album || '' - }, - musicAlbumArtist() { - return this.mediaMetadata.albumArtist || '' - }, - musicTrackPretty() { - if (!this.mediaMetadata.trackNumber) return null - if (!this.mediaMetadata.trackTotal) return this.mediaMetadata.trackNumber - return `${this.mediaMetadata.trackNumber} / ${this.mediaMetadata.trackTotal}` - }, - musicDiscPretty() { - if (!this.mediaMetadata.discNumber) return null - if (!this.mediaMetadata.discTotal) return this.mediaMetadata.discNumber - return `${this.mediaMetadata.discNumber} / ${this.mediaMetadata.discTotal}` - }, - narrators() { - return this.mediaMetadata.narrators || [] - }, series() { return this.mediaMetadata.series || [] }, @@ -421,26 +313,10 @@ export default { } }) }, - durationPretty() { - if (this.isPodcast) return this.$elapsedPrettyExtended(this.totalPodcastDuration) - - if (!this.tracks.length && !this.audioFile) return 'N/A' - if (this.audioFile) return this.$elapsedPrettyExtended(this.duration) - return this.$elapsedPretty(this.duration) - }, duration() { if (!this.tracks.length && !this.audioFile) return 0 return this.media.duration }, - totalPodcastDuration() { - if (!this.podcastEpisodes.length) return 0 - let totalDuration = 0 - this.podcastEpisodes.forEach((ep) => (totalDuration += ep.duration || 0)) - return totalDuration - }, - sizePretty() { - return this.$bytesPretty(this.media.size) - }, libraryFiles() { return this.libraryItem.libraryFiles || [] }, From 58ebde2982f18557e4a8a2bfe42bbb501c05bac4 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 30 Apr 2023 09:45:28 -0500 Subject: [PATCH 03/39] Update:Podcast episode audio files More Info option --- client/components/tables/LibraryFilesTable.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/components/tables/LibraryFilesTable.vue b/client/components/tables/LibraryFilesTable.vue index 12ad86e5..f3a24331 100644 --- a/client/components/tables/LibraryFilesTable.vue +++ b/client/components/tables/LibraryFilesTable.vue @@ -70,6 +70,9 @@ export default { return this.libraryItem.libraryFiles || [] }, audioFiles() { + if (this.libraryItem.mediaType === 'podcast') { + return this.libraryItem.media?.episodes.map((ep) => ep.audioFile) || [] + } return this.libraryItem.media?.audioFiles || [] }, filesWithAudioFile() { From eb7f66c89e15442e1e8a30a1a537be418931ec36 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 30 Apr 2023 14:11:54 -0500 Subject: [PATCH 04/39] Add:Narrators page #860 #1139 --- client/assets/app.css | 2 +- client/components/app/SideRail.vue | 27 ++- client/components/cards/NarratorCard.vue | 4 +- .../pages/config/item-metadata-utils/tags.vue | 4 +- client/pages/library/_library/narrators.vue | 161 ++++++++++++++++++ client/strings/en-us.json | 1 + server/controllers/LibraryController.js | 86 +++++++++- server/objects/metadata/BookMetadata.js | 26 +++ server/routers/ApiRouter.js | 3 + 9 files changed, 296 insertions(+), 18 deletions(-) create mode 100644 client/pages/library/_library/narrators.vue diff --git a/client/assets/app.css b/client/assets/app.css index c823af2f..f8e51521 100644 --- a/client/assets/app.css +++ b/client/assets/app.css @@ -112,7 +112,7 @@ input[type=number] { background-color: #373838; } -.tracksTable tr:hover { +.tracksTable tr:hover:not(:has(th)) { background-color: #474747; } diff --git a/client/components/app/SideRail.vue b/client/components/app/SideRail.vue index 25350d24..995f4c23 100644 --- a/client/components/app/SideRail.vue +++ b/client/components/app/SideRail.vue @@ -49,6 +49,14 @@
+ + queue_music + +

{{ $strings.ButtonPlaylists }}

+ +
+ + + + record_voice_over + +

{{ $strings.LabelNarrators }}

+ +
+ + @@ -78,14 +94,6 @@
- - queue_music - -

{{ $strings.ButtonPlaylists }}

- -
- - file_download @@ -178,6 +186,9 @@ export default { isAuthorsPage() { return this.$route.name === 'library-library-authors' }, + isNarratorsPage() { + return this.$route.name === 'library-library-narrators' + }, isPlaylistsPage() { return this.paramId === 'playlists' }, diff --git a/client/components/cards/NarratorCard.vue b/client/components/cards/NarratorCard.vue index 9d3e5a30..7b8848cc 100644 --- a/client/components/cards/NarratorCard.vue +++ b/client/components/cards/NarratorCard.vue @@ -1,8 +1,8 @@