fix: don't mark ended on download episodes
All checks were successful
repod / xml (push) Successful in 26s
repod / php (push) Successful in 51s
repod / nodejs (push) Successful in 1m45s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-01-16 10:23:23 +01:00
parent 73068b1867
commit 80844d8ac0

View File

@ -5,7 +5,7 @@
<NcListItem v-for="episode in episodes"
:key="episode.guid"
:active="isCurrentEpisode(episode)"
:class="episode.action && episode.action.position >= episode.action.total ? 'ended': ''"
:class="hasEnded(episode) ? 'ended': ''"
:details="moment(episode.pubDate.date).fromNow()"
:force-display-actions="true"
:name="episode.name"
@ -104,6 +104,13 @@ export default {
methods: {
formatTimer,
moment,
hasEnded(episode) {
return episode.action
&& episode.action.position > 0
&& episode.action.started > 0
&& episode.action.total > 0
&& episode.action.position >= episode.action.total
},
isCurrentEpisode(episode) {
return this.currentEpisode && this.currentEpisode.url === episode.url
},