From 53dbdd115ff3141b7eeb1d36f546ea7942c2966c Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 27 Nov 2022 12:33:38 -0600 Subject: [PATCH] Update:Playlists for podcasts --- client/components/tables/playlist/ItemTableRow.vue | 2 +- .../components/tables/podcast/EpisodeTableRow.vue | 13 ++++++++++++- client/components/tables/podcast/EpisodesTable.vue | 6 +++++- client/strings/en-us.json | 3 +++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/client/components/tables/playlist/ItemTableRow.vue b/client/components/tables/playlist/ItemTableRow.vue index 29ec8e5b..366cbc5e 100644 --- a/client/components/tables/playlist/ItemTableRow.vue +++ b/client/components/tables/playlist/ItemTableRow.vue @@ -107,7 +107,7 @@ export default { return this.mediaMetadata.authors || [] }, itemDuration() { - if (this.episode) return this.episode.duration + if (this.episode) return this.$elapsedPretty(this.episode.duration) return this.$elapsedPretty(this.media.duration) }, isMissing() { diff --git a/client/components/tables/podcast/EpisodeTableRow.vue b/client/components/tables/podcast/EpisodeTableRow.vue index abb2af47..188a39e3 100644 --- a/client/components/tables/podcast/EpisodeTableRow.vue +++ b/client/components/tables/podcast/EpisodeTableRow.vue @@ -21,13 +21,21 @@ + + + + + + + + @@ -123,6 +131,9 @@ export default { } }, methods: { + clickAddToPlaylist() { + this.$emit('addToPlaylist', this.episode) + }, clickedEpisode() { this.$emit('view', this.episode) }, diff --git a/client/components/tables/podcast/EpisodesTable.vue b/client/components/tables/podcast/EpisodesTable.vue index e99fa815..5f5d8cf0 100644 --- a/client/components/tables/podcast/EpisodesTable.vue +++ b/client/components/tables/podcast/EpisodesTable.vue @@ -17,7 +17,7 @@

{{ $strings.MessageNoEpisodes }}

@@ -131,6 +131,10 @@ export default { } }, methods: { + addToPlaylist(episode) { + this.$store.commit('globals/setSelectedPlaylistItems', [{ libraryItem: this.libraryItem, episode }]) + this.$store.commit('globals/setShowPlaylistsModal', true) + }, addEpisodeToQueue(episode) { const queueItem = { libraryItemId: this.libraryItem.id, diff --git a/client/strings/en-us.json b/client/strings/en-us.json index b601c0ad..73907bde 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -411,7 +411,9 @@ "LabelWeekdaysToRun": "Weekdays to run", "LabelYourAudiobookDuration": "Your audiobook duration", "LabelYourBookmarks": "Your Bookmarks", + "LabelYourPlaylists": "Your Playlists", "LabelYourProgress": "Your Progress", + "MessageAddToPlayerQueue": "Add to player queue", "MessageAppriseDescription": "To use this feature you will need to have an instance of Apprise API running or an api that will handle those same requests.
The Apprise API Url should be the full URL path to send the notification, e.g., if your API instance is served at http://192.168.1.1:8337 then you would put http://192.168.1.1:8337/notify.", "MessageBackupsDescription": "Backups include users, user progress, library item details, server settings, and images stored in /metadata/items & /metadata/authors. Backups do not include any files stored in your library folders.", "MessageBatchQuickMatchDescription": "Quick Match will attempt to add missing covers and metadata for the selected items. Enable the options below to allow Quick Match to overwrite existing covers and/or metadata.", @@ -484,6 +486,7 @@ "MessageRemoveAllItemsWarning": "WARNING! This action will remove all library items from the database including any updates or matches you have made. This does not do anything to your actual files. Are you sure?", "MessageRemoveChapter": "Remove chapter", "MessageRemoveEpisodes": "Remove {0} episode(s)", + "MessageRemoveFromPlayerQueue": "Remove from player queue", "MessageRemoveUserWarning": "Are you sure you want to permanently delete user \"{0}\"?", "MessageReportBugsAndContribute": "Report bugs, request features, and contribute on", "MessageRestoreBackupConfirm": "Are you sure you want to restore the backup created on",