fix: don't mark ended on download episodes
This commit is contained in:
parent
73068b1867
commit
80844d8ac0
@ -5,7 +5,7 @@
|
|||||||
<NcListItem v-for="episode in episodes"
|
<NcListItem v-for="episode in episodes"
|
||||||
:key="episode.guid"
|
:key="episode.guid"
|
||||||
:active="isCurrentEpisode(episode)"
|
:active="isCurrentEpisode(episode)"
|
||||||
:class="episode.action && episode.action.position >= episode.action.total ? 'ended': ''"
|
:class="hasEnded(episode) ? 'ended': ''"
|
||||||
:details="moment(episode.pubDate.date).fromNow()"
|
:details="moment(episode.pubDate.date).fromNow()"
|
||||||
:force-display-actions="true"
|
:force-display-actions="true"
|
||||||
:name="episode.name"
|
:name="episode.name"
|
||||||
@ -104,6 +104,13 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
formatTimer,
|
formatTimer,
|
||||||
moment,
|
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) {
|
isCurrentEpisode(episode) {
|
||||||
return this.currentEpisode && this.currentEpisode.url === episode.url
|
return this.currentEpisode && this.currentEpisode.url === episode.url
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user