diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 51f657dbc..2258c306c 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -711,6 +711,7 @@ export default { var router = this.$router || this.$nuxt.$router if (router) { if (this.collapsedSeries) router.push(`/library/${this.libraryId}/series/${this.collapsedSeries.id}`) + else if (this.recentEpisode) router.push(`/item/${this.libraryItemId}?episodeId=${this.recentEpisode.id}`) else router.push(`/item/${this.libraryItemId}`) } } diff --git a/client/components/controls/GlobalSearch.vue b/client/components/controls/GlobalSearch.vue index 6f3a819bf..d24683876 100644 --- a/client/components/controls/GlobalSearch.vue +++ b/client/components/controls/GlobalSearch.vue @@ -42,7 +42,7 @@

{{ $strings.LabelEpisodes }}

+
  • + +
  • diff --git a/client/components/modals/podcast/ViewEpisode.vue b/client/components/modals/podcast/ViewEpisode.vue index 2502a5ea4..b317c69e2 100644 --- a/client/components/modals/podcast/ViewEpisode.vue +++ b/client/components/modals/podcast/ViewEpisode.vue @@ -14,6 +14,9 @@

    {{ podcastTitle }}

    {{ podcastAuthor }}

    +

    {{ title }}

    @@ -105,6 +108,13 @@ export default { } }, methods: { + play() { + this.$eventBus.$emit('play-item', { + libraryItemId: this.libraryItem.id, + episodeId: this.episodeId + }) + this.show = false + }, handleDescriptionClick(e) { if (e.target.matches('span.time-marker')) { const time = parseInt(e.target.dataset.time) diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index 1d8f0f20b..205140554 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -785,6 +785,16 @@ export default { this.episodeDownloadsQueued = this.libraryItem.episodeDownloadsQueued || [] this.episodesDownloading = this.libraryItem.episodesDownloading || [] + const episodeId = this.$route.query.episodeId + if (episodeId) { + const episode = this.podcastEpisodes.find((ep) => ep.id === episodeId) + if (episode) { + this.$store.commit('setSelectedLibraryItem', this.libraryItem) + this.$store.commit('globals/setSelectedEpisode', episode) + this.$store.commit('globals/setShowViewPodcastEpisodeModal', true) + } + } + this.$eventBus.$on(`${this.libraryItem.id}_updated`, this.libraryItemUpdated) this.$root.socket.on('item_updated', this.libraryItemUpdated) this.$root.socket.on('rss_feed_open', this.rssFeedOpen) diff --git a/server/utils/queries/libraryItemsPodcastFilters.js b/server/utils/queries/libraryItemsPodcastFilters.js index 8bb5dc110..b739fbb35 100644 --- a/server/utils/queries/libraryItemsPodcastFilters.js +++ b/server/utils/queries/libraryItemsPodcastFilters.js @@ -414,10 +414,10 @@ module.exports = { }) } - // Search podcast episode title + // Search podcast episode title and description const podcastEpisodes = await Database.podcastEpisodeModel.findAll({ where: [ - Sequelize.literal(textSearchQuery.matchExpression('podcastEpisode.title')), + Sequelize.literal(`(${textSearchQuery.matchExpression('podcastEpisode.title')} OR ${textSearchQuery.matchExpression('podcastEpisode.description')})`), { '$podcast.libraryItem.libraryId$': library.id }