mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 22:57:16 +02:00
Add:Downloaded filter for podcast episodes #959
Fix:More menu button not working for podcasts with some episodes downloaded
This commit is contained in:
@@ -165,7 +165,7 @@ export default {
|
|||||||
},
|
},
|
||||||
localEpisode() {
|
localEpisode() {
|
||||||
if (this.isLocal) return this.episode
|
if (this.isLocal) return this.episode
|
||||||
return this.episode.localEpisode
|
return this.episode?.localEpisode
|
||||||
},
|
},
|
||||||
localEpisodeId() {
|
localEpisodeId() {
|
||||||
return this.localEpisode?.id || null
|
return this.localEpisode?.id || null
|
||||||
|
|||||||
@@ -132,10 +132,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemProgressPercent() {
|
itemProgressPercent() {
|
||||||
return this.itemProgress ? this.itemProgress.progress : 0
|
return this.itemProgress?.progress || 0
|
||||||
},
|
},
|
||||||
userIsFinished() {
|
userIsFinished() {
|
||||||
return this.itemProgress ? !!this.itemProgress.isFinished : false
|
return !!this.itemProgress?.isFinished
|
||||||
},
|
},
|
||||||
timeRemaining() {
|
timeRemaining() {
|
||||||
if (this.streamIsPlaying) return 'Playing'
|
if (this.streamIsPlaying) return 'Playing'
|
||||||
@@ -151,7 +151,7 @@ export default {
|
|||||||
return this.$store.getters['globals/getDownloadItem'](this.libraryItemId, this.episode.id)
|
return this.$store.getters['globals/getDownloadItem'](this.libraryItemId, this.episode.id)
|
||||||
},
|
},
|
||||||
localEpisodeId() {
|
localEpisodeId() {
|
||||||
return this.localEpisode ? this.localEpisode.id : null
|
return this.localEpisode?.id || null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -116,6 +116,10 @@ export default {
|
|||||||
{
|
{
|
||||||
text: 'Complete',
|
text: 'Complete',
|
||||||
value: 'complete'
|
value: 'complete'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Downloaded',
|
||||||
|
value: 'downloaded'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
fetchingRSSFeed: false,
|
fetchingRSSFeed: false,
|
||||||
@@ -141,10 +145,10 @@ export default {
|
|||||||
return this.$store.state.networkConnected
|
return this.$store.state.networkConnected
|
||||||
},
|
},
|
||||||
libraryItemId() {
|
libraryItemId() {
|
||||||
return this.libraryItem ? this.libraryItem.id : null
|
return this.libraryItem?.id || null
|
||||||
},
|
},
|
||||||
media() {
|
media() {
|
||||||
return this.libraryItem ? this.libraryItem.media || {} : {}
|
return this.libraryItem?.media || {}
|
||||||
},
|
},
|
||||||
mediaMetadata() {
|
mediaMetadata() {
|
||||||
return this.media.metadata || {}
|
return this.media.metadata || {}
|
||||||
@@ -154,11 +158,14 @@ export default {
|
|||||||
},
|
},
|
||||||
episodesFiltered() {
|
episodesFiltered() {
|
||||||
return this.episodesCopy.filter((ep) => {
|
return this.episodesCopy.filter((ep) => {
|
||||||
|
if (this.filterKey === 'downloaded') {
|
||||||
|
return !!this.localEpisodeMap[ep.id]
|
||||||
|
}
|
||||||
var mediaProgress = this.getEpisodeProgress(ep)
|
var mediaProgress = this.getEpisodeProgress(ep)
|
||||||
if (this.filterKey === 'incomplete') {
|
if (this.filterKey === 'incomplete') {
|
||||||
return !mediaProgress || !mediaProgress.isFinished
|
return !mediaProgress?.isFinished
|
||||||
} else if (this.filterKey === 'complete') {
|
} else if (this.filterKey === 'complete') {
|
||||||
return mediaProgress && mediaProgress.isFinished
|
return mediaProgress?.isFinished
|
||||||
} else if (this.filterKey === 'inProgress') {
|
} else if (this.filterKey === 'inProgress') {
|
||||||
return mediaProgress && !mediaProgress.isFinished
|
return mediaProgress && !mediaProgress.isFinished
|
||||||
} else if (this.filterKey === 'all') {
|
} else if (this.filterKey === 'all') {
|
||||||
|
|||||||
Reference in New Issue
Block a user