diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue index 74a8ab40..0b18457e 100644 --- a/client/components/app/BookShelfToolbar.vue +++ b/client/components/app/BookShelfToolbar.vue @@ -51,6 +51,11 @@
+ + + + + @@ -229,6 +234,9 @@ export default { seriesProgress() { return this.selectedSeries ? this.selectedSeries.progress : null }, + seriesRssFeed() { + return this.selectedSeries ? this.selectedSeries.rssFeed : null + }, seriesLibraryItemIds() { if (!this.seriesProgress) return [] return this.seriesProgress.libraryItemIds || [] @@ -253,7 +261,7 @@ export default { methods: { seriesContextMenuAction(action) { if (action === 'open-rss-feed') { - // TODO: Open RSS Feed + this.showOpenSeriesRSSFeed() } else if (action === 're-add-to-continue-listening') { if (this.processingSeries) { console.warn('Already processing series') @@ -268,6 +276,14 @@ export default { this.markSeriesFinished() } }, + showOpenSeriesRSSFeed() { + this.$store.commit('globals/setRSSFeedOpenCloseModal', { + id: this.selectedSeries.id, + name: this.selectedSeries.name, + type: 'series', + feed: this.selectedSeries.rssFeed + }) + }, reAddSeriesToContinueListening() { this.processingSeries = true this.$axios @@ -396,16 +412,32 @@ export default { }, setBookshelfTotalEntities(totalEntities) { this.totalEntities = totalEntities + }, + rssFeedOpen(data) { + if (data.entityId === this.seriesId) { + console.log('RSS Feed Opened', data) + this.selectedSeries.rssFeed = data + } + }, + rssFeedClosed(data) { + if (data.entityId === this.seriesId) { + console.log('RSS Feed Closed', data) + this.selectedSeries.rssFeed = null + } } }, mounted() { this.init() this.$eventBus.$on('user-settings', this.settingsUpdated) this.$eventBus.$on('bookshelf-total-entities', this.setBookshelfTotalEntities) + this.$root.socket.on('rss_feed_open', this.rssFeedOpen) + this.$root.socket.on('rss_feed_closed', this.rssFeedClosed) }, beforeDestroy() { this.$eventBus.$off('user-settings', this.settingsUpdated) this.$eventBus.$off('bookshelf-total-entities', this.setBookshelfTotalEntities) + this.$root.socket.off('rss_feed_open', this.rssFeedOpen) + this.$root.socket.off('rss_feed_closed', this.rssFeedClosed) } } diff --git a/client/components/cards/LazySeriesCard.vue b/client/components/cards/LazySeriesCard.vue index aa2ba843..2a40f6ec 100644 --- a/client/components/cards/LazySeriesCard.vue +++ b/client/components/cards/LazySeriesCard.vue @@ -13,6 +13,8 @@

{{ displayTitle }}

+ rss_feed +

{{ displayTitle }}

@@ -125,6 +127,9 @@ export default { isAlternativeBookshelfView() { const constants = this.$constants || this.$nuxt.$constants return this.bookshelfView == constants.BookshelfView.DETAIL + }, + rssFeed() { + return this.series ? this.series.rssFeed : null } }, methods: { diff --git a/client/layouts/default.vue b/client/layouts/default.vue index 450133c2..d5ab8937 100644 --- a/client/layouts/default.vue +++ b/client/layouts/default.vue @@ -330,12 +330,6 @@ export default { } this.$store.commit('libraries/removeUserPlaylist', playlist) }, - rssFeedOpen(data) { - console.log('RSS Feed Open', data) - }, - rssFeedClosed(data) { - console.log('RSS Feed Closed', data) - }, backupApplied() { // Force refresh location.reload() @@ -425,10 +419,6 @@ export default { this.socket.on('task_started', this.taskStarted) this.socket.on('task_finished', this.taskFinished) - // Feed Listeners - this.socket.on('rss_feed_open', this.rssFeedOpen) - this.socket.on('rss_feed_closed', this.rssFeedClosed) - this.socket.on('backup_applied', this.backupApplied) this.socket.on('batch_quickmatch_complete', this.batchQuickMatchComplete) diff --git a/client/pages/library/_library/series/_id.vue b/client/pages/library/_library/series/_id.vue index e07a055f..c6ad6ad2 100644 --- a/client/pages/library/_library/series/_id.vue +++ b/client/pages/library/_library/series/_id.vue @@ -8,8 +8,8 @@