mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-03 17:54:54 +02:00
Update API media progress endpoints to use new user model. Merge book & episode endpoints
This commit is contained in:
parent
68ef3a07a7
commit
9cd92c7b7f
8 changed files with 295 additions and 109 deletions
|
@ -182,7 +182,7 @@ export default {
|
|||
toggleFinished(confirmed = false) {
|
||||
if (!this.userIsFinished && this.itemProgressPercent > 0 && !confirmed) {
|
||||
const payload = {
|
||||
message: `Are you sure you want to mark "${this.title}" as finished?`,
|
||||
message: `Are you sure you want to mark "${this.episodeTitle}" as finished?`,
|
||||
callback: (confirmed) => {
|
||||
if (confirmed) {
|
||||
this.toggleFinished(true)
|
||||
|
@ -233,4 +233,4 @@ export default {
|
|||
},
|
||||
mounted() {}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -246,7 +246,7 @@ export default {
|
|||
message: newIsFinished ? this.$strings.MessageConfirmMarkAllEpisodesFinished : this.$strings.MessageConfirmMarkAllEpisodesNotFinished,
|
||||
callback: (confirmed) => {
|
||||
if (confirmed) {
|
||||
this.batchUpdateEpisodesFinished(this.episodesSorted, newIsFinished)
|
||||
this.batchUpdateEpisodesFinished(this.episodesCopy, newIsFinished)
|
||||
}
|
||||
},
|
||||
type: 'yesNo'
|
||||
|
@ -305,6 +305,7 @@ export default {
|
|||
this.batchUpdateEpisodesFinished(this.selectedEpisodes, !this.selectedIsFinished)
|
||||
},
|
||||
batchUpdateEpisodesFinished(episodes, newIsFinished) {
|
||||
if (!episodes.length) return
|
||||
this.processing = true
|
||||
|
||||
const updateProgressPayloads = episodes.map((episode) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue