diff --git a/components/cards/LazySeriesCard.vue b/components/cards/LazySeriesCard.vue
index 7fdd4548..7ca5076c 100644
--- a/components/cards/LazySeriesCard.vue
+++ b/components/cards/LazySeriesCard.vue
@@ -5,6 +5,8 @@
+
+
@@ -53,6 +55,27 @@ export default {
books() {
return this.series ? this.series.books || [] : []
},
+ seriesBookProgress() {
+ return this.books
+ .map((libraryItem) => {
+ return this.store.getters['user/getUserMediaProgress'](libraryItem.id)
+ })
+ .filter((p) => !!p)
+ },
+ seriesBooksFinished() {
+ return this.seriesBookProgress.filter((p) => p.isFinished)
+ },
+ hasSeriesBookInProgress() {
+ return this.seriesBookProgress.some((p) => !p.isFinished && p.progress > 0)
+ },
+ seriesPercentInProgress() {
+ let totalFinishedAndInProgress = this.seriesBooksFinished.length
+ if (this.hasSeriesBookInProgress) totalFinishedAndInProgress += 1
+ return Math.min(1, Math.max(0, totalFinishedAndInProgress / this.books.length))
+ },
+ isSeriesFinished() {
+ return this.books.length === this.seriesBooksFinished.length
+ },
store() {
return this.$store || this.$nuxt.$store
},