New data model removing media entity for books

This commit is contained in:
advplyr 2022-03-26 11:59:34 -05:00
parent 920ca683b9
commit 3150822117
44 changed files with 733 additions and 798 deletions

View file

@ -100,8 +100,8 @@ export default {
selectedLibraryItems() {
return this.$store.state.selectedLibraryItems
},
userItemProgress() {
return this.$store.state.user.user.libraryItemProgress || []
userMediaProgress() {
return this.$store.state.user.user.mediaProgress || []
},
userCanUpdate() {
return this.$store.getters['user/getUserCanUpdate']
@ -115,7 +115,7 @@ export default {
selectedIsFinished() {
// Find an item that is not finished, if none then all items finished
return !this.selectedLibraryItems.find((libraryItemId) => {
var itemProgress = this.userItemProgress.find((lip) => lip.id === libraryItemId)
var itemProgress = this.userMediaProgress.find((lip) => lip.id === libraryItemId)
return !itemProgress || !itemProgress.isFinished
})
},

View file

@ -82,9 +82,6 @@ export default {
shelfHeight() {
return this.bookCoverHeight + 48
},
userAudiobooks() {
return this.$store.state.user.user ? this.$store.state.user.user.audiobooks || {} : {}
},
paddingLeft() {
if (window.innerWidth < 768) return 1
return 2.5

View file

@ -93,12 +93,12 @@ export default {
user() {
return this.$store.state.user.user
},
userLibraryItemProgress() {
userMediaProgress() {
if (!this.libraryItemId) return
return this.$store.getters['user/getUserLibraryItemProgress'](this.libraryItemId)
return this.$store.getters['user/getUserMediaProgress'](this.libraryItemId)
},
userItemCurrentTime() {
return this.userLibraryItemProgress ? this.userLibraryItemProgress.currentTime || 0 : 0
return this.userMediaProgress ? this.userMediaProgress.currentTime || 0 : 0
},
bookmarks() {
if (!this.libraryItemId) return []