diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue
index faa93997..d8931690 100644
--- a/client/components/cards/LazyBookCard.vue
+++ b/client/components/cards/LazyBookCard.vue
@@ -45,10 +45,8 @@
-
-
-
-
+
+
@@ -343,11 +341,22 @@ export default {
if (!this.userProgress || this.userProgress.progress) return false
return this.userProgress.ebookProgress > 0
},
+ seriesProgressPercent() {
+ if (!this.libraryItemIdsInSeries.length) return 0
+ let progressPercent = 0
+ const useEBookProgress = this.useEBookProgress
+ this.libraryItemIdsInSeries.forEach((lid) => {
+ const progress = this.store.getters['user/getUserMediaProgress'](lid)
+ if (progress && progress.progress) progressPercent += useEBookProgress ? progress.ebookProgress || 0 : progress.progress || 0
+ })
+ return progressPercent / this.libraryItemIdsInSeries.length
+ },
userProgressPercent() {
- if (this.useEBookProgress) return Math.max(Math.min(1, this.userProgress.ebookProgress), 0)
- return this.userProgress ? Math.max(Math.min(1, this.userProgress.progress), 0) || 0 : 0
+ let progressPercent = this.booksInSeries ? this.seriesProgressPercent : this.useEBookProgress ? this.userProgress?.ebookProgress || 0 : this.userProgress?.progress || 0
+ return Math.max(Math.min(1, progressPercent), 0)
},
itemIsFinished() {
+ if (this.booksInSeries) return this.seriesIsFinished
return this.userProgress ? !!this.userProgress.isFinished : false
},
seriesIsFinished() {