mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-13 07:24:55 +02:00
Merge
This commit is contained in:
parent
ccba8dc3c7
commit
ae195e7b58
32 changed files with 626 additions and 191 deletions
|
@ -3,7 +3,7 @@
|
|||
<p class="text-lg mb-1 font-semibold">Episodes ({{ episodes.length }})</p>
|
||||
|
||||
<template v-for="episode in episodes">
|
||||
<tables-podcast-episode-row :episode="episode" :library-item-id="libraryItemId" :key="episode.id" />
|
||||
<tables-podcast-episode-row :episode="episode" :local-episode="localEpisodeMap[episode.id]" :library-item-id="libraryItemId" :local-library-item-id="localLibraryItemId" :is-local="isLocal" :key="episode.id" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -15,12 +15,29 @@ export default {
|
|||
episodes: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
localLibraryItemId: String,
|
||||
localEpisodes: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
isLocal: Boolean // If is local then episodes and libraryItemId are local, otherwise local is passed in localLibraryItemId and localEpisodes
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
// Map of local episodes where server episode id is key
|
||||
localEpisodeMap() {
|
||||
var epmap = {}
|
||||
this.localEpisodes.forEach((localEp) => {
|
||||
if (localEp.serverEpisodeId) {
|
||||
epmap[localEp.serverEpisodeId] = localEp
|
||||
}
|
||||
})
|
||||
return epmap
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
mounted() {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue