diff --git a/client/components/app/BookShelfCategorized.vue b/client/components/app/BookShelfCategorized.vue index 40793610..fbed11be 100644 --- a/client/components/app/BookShelfCategorized.vue +++ b/client/components/app/BookShelfCategorized.vue @@ -171,7 +171,7 @@ export default { }, async fetchCategories() { const categories = await this.$axios - .$get(`/api/libraries/${this.currentLibraryId}/personalized2?include=rssfeed,numEpisodesIncomplete`) + .$get(`/api/libraries/${this.currentLibraryId}/personalized?include=rssfeed,numEpisodesIncomplete`) .then((data) => { return data }) diff --git a/client/components/app/LazyBookshelf.vue b/client/components/app/LazyBookshelf.vue index 3bc98fde..259b31ae 100644 --- a/client/components/app/LazyBookshelf.vue +++ b/client/components/app/LazyBookshelf.vue @@ -628,6 +628,11 @@ export default { return entitiesPerShelfBefore < this.entitiesPerShelf // Books per shelf has changed }, async init(bookshelf) { + if (this.entityName === 'series') { + this.booksPerFetch = 50 + } else { + this.booksPerFetch = 100 + } this.checkUpdateSearchParams() this.initSizeData(bookshelf) diff --git a/client/components/cards/NarratorCard.vue b/client/components/cards/NarratorCard.vue index 7b8848cc..e1b4840f 100644 --- a/client/components/cards/NarratorCard.vue +++ b/client/components/cards/NarratorCard.vue @@ -36,7 +36,7 @@ export default { return this.narrator?.name || '' }, numBooks() { - return this.narrator?.books?.length || 0 + return this.narrator?.numBooks || this.narrator?.books?.length || 0 }, userCanUpdate() { return this.$store.getters['user/getUserCanUpdate'] diff --git a/client/components/controls/GlobalSearch.vue b/client/components/controls/GlobalSearch.vue index a731dbcf..0c5ba41b 100644 --- a/client/components/controls/GlobalSearch.vue +++ b/client/components/controls/GlobalSearch.vue @@ -103,7 +103,7 @@ export default { return this.$store.state.libraries.currentLibraryId }, totalResults() { - return this.bookResults.length + this.seriesResults.length + this.authorResults.length + this.tagResults.length + this.podcastResults.length + return this.bookResults.length + this.seriesResults.length + this.authorResults.length + this.tagResults.length + this.podcastResults.length + this.narratorResults.length } }, methods: { diff --git a/client/components/covers/PreviewCover.vue b/client/components/covers/PreviewCover.vue index f25d655d..daf579ac 100644 --- a/client/components/covers/PreviewCover.vue +++ b/client/components/covers/PreviewCover.vue @@ -13,8 +13,8 @@
- -

Invalid Cover

+ +

Invalid Cover

@@ -58,6 +58,9 @@ export default { sizeMultiplier() { return this.width / 120 }, + invalidCoverFontSize() { + return Math.max(this.sizeMultiplier * 0.8, 0.5) + }, placeholderCoverPadding() { return 0.8 * this.sizeMultiplier }, diff --git a/client/components/stats/PreviewIcons.vue b/client/components/stats/PreviewIcons.vue index 488eae49..7bda889b 100644 --- a/client/components/stats/PreviewIcons.vue +++ b/client/components/stats/PreviewIcons.vue @@ -18,7 +18,7 @@ -
+
@@ -58,26 +58,32 @@ export default { return {} }, computed: { + currentLibraryMediaType() { + return this.$store.getters['libraries/getCurrentLibraryMediaType'] + }, + isBookLibrary() { + return this.currentLibraryMediaType === 'book' + }, user() { return this.$store.state.user.user }, totalItems() { - return this.libraryStats ? this.libraryStats.totalItems : 0 + return this.libraryStats?.totalItems || 0 }, totalAuthors() { - return this.libraryStats ? this.libraryStats.totalAuthors : 0 + return this.libraryStats?.totalAuthors || 0 }, numAudioTracks() { - return this.libraryStats ? this.libraryStats.numAudioTracks : 0 + return this.libraryStats?.numAudioTracks || 0 }, totalDuration() { - return this.libraryStats ? this.libraryStats.totalDuration : 0 + return this.libraryStats?.totalDuration || 0 }, totalHours() { return Math.round(this.totalDuration / (60 * 60)) }, totalSizePretty() { - var totalSize = this.libraryStats ? this.libraryStats.totalSize : 0 + var totalSize = this.libraryStats?.totalSize || 0 return this.$bytesPretty(totalSize, 1) }, totalSizeNum() { diff --git a/client/layouts/default.vue b/client/layouts/default.vue index d27936e2..805fb8a1 100644 --- a/client/layouts/default.vue +++ b/client/layouts/default.vue @@ -343,6 +343,10 @@ export default { } this.$store.commit('libraries/removeCollection', collection) }, + seriesRemoved({ id, libraryId }) { + if (this.currentLibraryId !== libraryId) return + this.$store.commit('libraries/removeSeriesFromFilterData', id) + }, playlistAdded(playlist) { if (playlist.userId !== this.user.id || this.currentLibraryId !== playlist.libraryId) return this.$store.commit('libraries/addUpdateUserPlaylist', playlist) @@ -442,6 +446,9 @@ export default { this.socket.on('collection_updated', this.collectionUpdated) this.socket.on('collection_removed', this.collectionRemoved) + // Series Listeners + this.socket.on('series_removed', this.seriesRemoved) + // User Playlist Listeners this.socket.on('playlist_added', this.playlistAdded) this.socket.on('playlist_updated', this.playlistUpdated) diff --git a/client/pages/config/library-stats.vue b/client/pages/config/library-stats.vue index cc3dbf8e..1a95c630 100644 --- a/client/pages/config/library-stats.vue +++ b/client/pages/config/library-stats.vue @@ -22,7 +22,7 @@
-
+

{{ $strings.HeaderStatsTop10Authors }}

{{ $strings.MessageNoAuthors }}