From 604a6715495911e5f36f051b821b2109287636b7 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 30 Apr 2023 09:41:49 -0500 Subject: [PATCH] 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 || [] },