diff --git a/components/app/AudioPlayerContainer.vue b/components/app/AudioPlayerContainer.vue index 29fff400..757c39f3 100644 --- a/components/app/AudioPlayerContainer.vue +++ b/components/app/AudioPlayerContainer.vue @@ -290,6 +290,8 @@ export default { * When device gains focus then refresh the timestamps in the audio player */ deviceFocused(hasFocus) { + if (!this.$store.state.currentPlaybackSession) return + if (hasFocus) { if (!this.$refs.audioPlayer?.isPlaying) { const playbackSession = this.$store.state.currentPlaybackSession diff --git a/components/bookshelf/LazyBookshelf.vue b/components/bookshelf/LazyBookshelf.vue index 923e3b6b..c99307d3 100644 --- a/components/bookshelf/LazyBookshelf.vue +++ b/components/bookshelf/LazyBookshelf.vue @@ -164,7 +164,7 @@ export default { const entityPath = this.entityName === 'books' || this.entityName === 'series-books' ? `items` : this.entityName const sfQueryString = this.currentSFQueryString ? this.currentSFQueryString + '&' : '' - const fullQueryString = `?${sfQueryString}limit=${this.booksPerFetch}&page=${page}&minified=1&include=rssfeed` + const fullQueryString = `?${sfQueryString}limit=${this.booksPerFetch}&page=${page}&minified=1&include=rssfeed,numEpisodesIncomplete` const payload = await this.$axios.$get(`/api/libraries/${this.currentLibraryId}/${entityPath}${fullQueryString}`).catch((error) => { console.error('failed to fetch books', error) diff --git a/components/cards/LazyBookCard.vue b/components/cards/LazyBookCard.vue index 61318361..c47dd986 100644 --- a/components/cards/LazyBookCard.vue +++ b/components/cards/LazyBookCard.vue @@ -81,9 +81,14 @@ -
+

{{ numEpisodes }}

+ + +
+

{{ numEpisodesIncomplete }}

+
@@ -186,6 +191,10 @@ export default { if (this.isLocal && this.isPodcast && this.media.episodes) return this.media.episodes.length return this.media.numEpisodes }, + numEpisodesIncomplete() { + if (this.isLocal) return 0 + return this._libraryItem.numEpisodesIncomplete || 0 + }, processingBatch() { return this.store.state.processingBatch }, diff --git a/pages/bookshelf/index.vue b/pages/bookshelf/index.vue index e8f4d46f..e7d9447f 100644 --- a/pages/bookshelf/index.vue +++ b/pages/bookshelf/index.vue @@ -236,7 +236,7 @@ export default { console.log('[categories] Local shelves set', this.shelves.length, this.lastLocalFetch) if (isConnectedToServerWithInternet) { - const categories = await this.$axios.$get(`/api/libraries/${this.currentLibraryId}/personalized?minified=1&include=rssfeed`).catch((error) => { + const categories = await this.$axios.$get(`/api/libraries/${this.currentLibraryId}/personalized?minified=1&include=rssfeed,numEpisodesIncomplete`).catch((error) => { console.error('[categories] Failed to fetch categories', error) return [] })