This commit is contained in:
advplyr 2022-04-15 20:48:39 -05:00
parent ccba8dc3c7
commit ae195e7b58
32 changed files with 626 additions and 191 deletions

View file

@ -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() {}
}