mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-05 02:34:56 +02:00
Update episode list to come from component ref, populate queue from table order when playing episode
This commit is contained in:
parent
72169990ac
commit
fd1c8ee513
3 changed files with 11 additions and 28 deletions
|
@ -132,7 +132,7 @@
|
|||
|
||||
<tables-tracks-table v-if="tracks.length" :title="$strings.LabelStatsAudioTracks" :tracks="tracksWithAudioFile" :is-file="isFile" :library-item-id="libraryItemId" class="mt-6" />
|
||||
|
||||
<tables-podcast-lazy-episodes-table v-if="isPodcast" :library-item="libraryItem" />
|
||||
<tables-podcast-lazy-episodes-table ref="episodesTable" v-if="isPodcast" :library-item="libraryItem" />
|
||||
|
||||
<tables-ebook-files-table v-if="ebookFiles.length" :library-item="libraryItem" class="mt-6" />
|
||||
|
||||
|
@ -267,9 +267,6 @@ export default {
|
|||
podcastEpisodes() {
|
||||
return this.media.episodes || []
|
||||
},
|
||||
sortedEpisodeIds() {
|
||||
return this.$store.getters.getSortedEpisodeIds
|
||||
},
|
||||
title() {
|
||||
return this.mediaMetadata.title || 'No Title'
|
||||
},
|
||||
|
@ -537,8 +534,8 @@ export default {
|
|||
let episodeId = null
|
||||
const queueItems = []
|
||||
if (this.isPodcast) {
|
||||
// Sort the episodes based on the sorting and filtering from the episode table component
|
||||
const episodesInListeningOrder = this.sortedEpisodeIds.map((id) => this.podcastEpisodes.find((ep) => ep.id === id))
|
||||
// Uses the sorting and filtering from the episode table component
|
||||
const episodesInListeningOrder = this.$refs.episodesTable?.episodesList || []
|
||||
|
||||
// Find the first unplayed episode from the table
|
||||
let episodeIndex = episodesInListeningOrder.findIndex((ep) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue