mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-25 05:09:40 +00:00
New data model fix collections page & table
This commit is contained in:
parent
27f1bd90f9
commit
122f2a2556
3 changed files with 12 additions and 22 deletions
|
|
@ -83,7 +83,7 @@ export default {
|
|||
},
|
||||
playableBooks() {
|
||||
return this.bookItems.filter((book) => {
|
||||
return !book.isMissing && !book.isInvalid && book.numTracks
|
||||
return !book.isMissing && !book.isInvalid && book.media.audiobooks.length
|
||||
})
|
||||
},
|
||||
streaming() {
|
||||
|
|
@ -91,9 +91,6 @@ export default {
|
|||
},
|
||||
showPlayButton() {
|
||||
return this.playableBooks.length
|
||||
},
|
||||
userAudiobooks() {
|
||||
return this.$store.state.user.user ? this.$store.state.user.user.audiobooks || {} : {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -118,7 +115,10 @@ export default {
|
|||
}
|
||||
},
|
||||
clickPlay() {
|
||||
var nextBookNotRead = this.playableBooks.find((pb) => !this.userAudiobooks[pb.id] || !this.userAudiobooks[pb.id].isRead)
|
||||
var nextBookNotRead = this.playableBooks.find((pb) => {
|
||||
var prog = this.$store.getters['user/getUserLibraryItemProgress'](pb.id)
|
||||
return !prog || !prog.isFinished
|
||||
})
|
||||
if (nextBookNotRead) {
|
||||
this.$eventBus.$emit('play-item', nextBookNotRead.id)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue