mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-12 23:14:48 +02:00
Fix:Latest podcast episodes to play local
This commit is contained in:
parent
41477fdac1
commit
b6824cf242
1 changed files with 6 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
||||||
<h1 class="text-xl mb-2 font-semibold">{{ $strings.HeaderLatestEpisodes }}</h1>
|
<h1 class="text-xl mb-2 font-semibold">{{ $strings.HeaderLatestEpisodes }}</h1>
|
||||||
|
|
||||||
<template v-for="episode in recentEpisodes">
|
<template v-for="episode in recentEpisodes">
|
||||||
<tables-podcast-latest-episode-row :episode="episode" :local-episode="localEpisodeMap[episode.id]" :library-item-id="episode.libraryItemId" :local-library-item-id="null" :is-local="isLocal" :key="episode.id" @addToPlaylist="addEpisodeToPlaylist" />
|
<tables-podcast-latest-episode-row :episode="episode" :local-episode="localEpisodeMap[episode.id]" :library-item-id="episode.libraryItemId" :local-library-item-id="localEpisodeMap[episode.id]?.localLibraryItemId" :key="episode.id" @addToPlaylist="addEpisodeToPlaylist" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -17,7 +17,6 @@ export default {
|
||||||
totalEpisodes: 0,
|
totalEpisodes: 0,
|
||||||
currentPage: 0,
|
currentPage: 0,
|
||||||
localLibraryItems: [],
|
localLibraryItems: [],
|
||||||
isLocal: false,
|
|
||||||
loadedLibraryId: null
|
loadedLibraryId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -30,7 +29,10 @@ export default {
|
||||||
const episodes = []
|
const episodes = []
|
||||||
this.localLibraryItems.forEach((li) => {
|
this.localLibraryItems.forEach((li) => {
|
||||||
if (li.media.episodes?.length) {
|
if (li.media.episodes?.length) {
|
||||||
episodes.push(...li.media.episodes)
|
li.media.episodes.map((ep) => {
|
||||||
|
ep.localLibraryItemId = li.id
|
||||||
|
episodes.push(ep)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return episodes
|
return episodes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue