mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 01:41:35 +00:00
Merge 3f2b6e8adc into 6f03467f35
This commit is contained in:
commit
95ffc8b624
5 changed files with 30 additions and 3 deletions
|
|
@ -711,6 +711,7 @@ export default {
|
||||||
var router = this.$router || this.$nuxt.$router
|
var router = this.$router || this.$nuxt.$router
|
||||||
if (router) {
|
if (router) {
|
||||||
if (this.collapsedSeries) router.push(`/library/${this.libraryId}/series/${this.collapsedSeries.id}`)
|
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}`)
|
else router.push(`/item/${this.libraryItemId}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<p v-if="episodeResults.length" class="uppercase text-xs text-gray-400 my-1 px-1 font-semibold">{{ $strings.LabelEpisodes }}</p>
|
<p v-if="episodeResults.length" class="uppercase text-xs text-gray-400 my-1 px-1 font-semibold">{{ $strings.LabelEpisodes }}</p>
|
||||||
<template v-for="item in episodeResults">
|
<template v-for="item in episodeResults">
|
||||||
<li :key="item.libraryItem.recentEpisode.id" class="text-gray-50 select-none relative cursor-pointer hover:bg-black-400 py-1" role="option" @click="clickOption">
|
<li :key="item.libraryItem.recentEpisode.id" class="text-gray-50 select-none relative cursor-pointer hover:bg-black-400 py-1" role="option" @click="clickOption">
|
||||||
<nuxt-link :to="`/item/${item.libraryItem.id}`">
|
<nuxt-link :to="`/item/${item.libraryItem.id}?episodeId=${item.libraryItem.recentEpisode.id}`">
|
||||||
<cards-episode-search-card :episode="item.libraryItem.recentEpisode" :library-item="item.libraryItem" />
|
<cards-episode-search-card :episode="item.libraryItem.recentEpisode" :library-item="item.libraryItem" />
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -92,6 +92,12 @@
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
<li class="border-t border-white/10 mt-2 pt-1">
|
||||||
|
<button class="w-full text-left px-2 py-2 text-xs text-gray-300 hover:text-white hover:bg-black-400 rounded flex items-center gap-1" @click="submitSearch">
|
||||||
|
<span class="material-symbols" style="font-size: 1rem">search</span>
|
||||||
|
{{ $strings.ButtonSeeAllResultsFor || 'See all results for' }} "{{ lastSearch }}"
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
<p class="text-base mb-1">{{ podcastTitle }}</p>
|
<p class="text-base mb-1">{{ podcastTitle }}</p>
|
||||||
<p class="text-xs text-gray-300">{{ podcastAuthor }}</p>
|
<p class="text-xs text-gray-300">{{ podcastAuthor }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<button class="flex items-center justify-center w-10 h-10 rounded-full bg-white/10 hover:bg-white/20 text-white" @click="play">
|
||||||
|
<span class="material-symbols text-2xl">play_arrow</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p dir="auto" class="text-lg font-semibold mb-6">{{ title }}</p>
|
<p dir="auto" class="text-lg font-semibold mb-6">{{ title }}</p>
|
||||||
<div v-if="description" dir="auto" class="default-style less-spacing" @click="handleDescriptionClick" v-html="description" />
|
<div v-if="description" dir="auto" class="default-style less-spacing" @click="handleDescriptionClick" v-html="description" />
|
||||||
|
|
@ -105,6 +108,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
play() {
|
||||||
|
this.$eventBus.$emit('play-item', {
|
||||||
|
libraryItemId: this.libraryItem.id,
|
||||||
|
episodeId: this.episodeId
|
||||||
|
})
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
handleDescriptionClick(e) {
|
handleDescriptionClick(e) {
|
||||||
if (e.target.matches('span.time-marker')) {
|
if (e.target.matches('span.time-marker')) {
|
||||||
const time = parseInt(e.target.dataset.time)
|
const time = parseInt(e.target.dataset.time)
|
||||||
|
|
|
||||||
|
|
@ -785,6 +785,16 @@ export default {
|
||||||
this.episodeDownloadsQueued = this.libraryItem.episodeDownloadsQueued || []
|
this.episodeDownloadsQueued = this.libraryItem.episodeDownloadsQueued || []
|
||||||
this.episodesDownloading = this.libraryItem.episodesDownloading || []
|
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.$eventBus.$on(`${this.libraryItem.id}_updated`, this.libraryItemUpdated)
|
||||||
this.$root.socket.on('item_updated', this.libraryItemUpdated)
|
this.$root.socket.on('item_updated', this.libraryItemUpdated)
|
||||||
this.$root.socket.on('rss_feed_open', this.rssFeedOpen)
|
this.$root.socket.on('rss_feed_open', this.rssFeedOpen)
|
||||||
|
|
|
||||||
|
|
@ -414,10 +414,10 @@ module.exports = {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search podcast episode title
|
// Search podcast episode title and description
|
||||||
const podcastEpisodes = await Database.podcastEpisodeModel.findAll({
|
const podcastEpisodes = await Database.podcastEpisodeModel.findAll({
|
||||||
where: [
|
where: [
|
||||||
Sequelize.literal(textSearchQuery.matchExpression('podcastEpisode.title')),
|
Sequelize.literal(`(${textSearchQuery.matchExpression('podcastEpisode.title')} OR ${textSearchQuery.matchExpression('podcastEpisode.description')})`),
|
||||||
{
|
{
|
||||||
'$podcast.libraryItem.libraryId$': library.id
|
'$podcast.libraryItem.libraryId$': library.id
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue