diff --git a/client/components/app/LazyBookshelf.vue b/client/components/app/LazyBookshelf.vue index 0a4e0c5b..9962cb55 100644 --- a/client/components/app/LazyBookshelf.vue +++ b/client/components/app/LazyBookshelf.vue @@ -88,6 +88,7 @@ export default { if (this.page === 'collections') return "You haven't made any collections yet" if (this.hasFilter) { if (this.filterName === 'Issues') return 'No Issues' + else if (this.filterName === 'Feed-open') return 'No RSS feeds are open' return `No Results for filter "${this.filterName}: ${this.filterValue}"` } return 'No results' diff --git a/client/components/controls/FilterSelect.vue b/client/components/controls/FilterSelect.vue index f7ed2c18..3a92f9a1 100644 --- a/client/components/controls/FilterSelect.vue +++ b/client/components/controls/FilterSelect.vue @@ -116,6 +116,11 @@ export default { text: 'Issues', value: 'issues', sublist: false + }, + { + text: 'RSS Feed Open', + value: 'feed-open', + sublist: false } ], podcastItems: [ diff --git a/server/controllers/LibraryController.js b/server/controllers/LibraryController.js index 58182625..2e27dfa6 100644 --- a/server/controllers/LibraryController.js +++ b/server/controllers/LibraryController.js @@ -163,7 +163,7 @@ class LibraryController { // If filtering by series, will include seriesName and seriesSequence on media metadata filterSeries = (payload.mediaType == 'book' && payload.filterBy.startsWith('series.')) ? libraryHelpers.decode(payload.filterBy.replace('series.', '')) : null - libraryItems = libraryHelpers.getFilteredLibraryItems(libraryItems, payload.filterBy, req.user) + libraryItems = libraryHelpers.getFilteredLibraryItems(libraryItems, payload.filterBy, req.user, this.rssFeedManager.feedsArray) payload.total = libraryItems.length } diff --git a/server/utils/libraryHelpers.js b/server/utils/libraryHelpers.js index ed87f129..0bd5607c 100644 --- a/server/utils/libraryHelpers.js +++ b/server/utils/libraryHelpers.js @@ -10,7 +10,7 @@ module.exports = { return Buffer.from(decodeURIComponent(text), 'base64').toString() }, - getFilteredLibraryItems(libraryItems, filterBy, user) { + getFilteredLibraryItems(libraryItems, filterBy, user, feedsArray) { var filtered = libraryItems var searchGroups = ['genres', 'tags', 'series', 'authors', 'progress', 'narrators', 'missing', 'languages'] @@ -61,6 +61,8 @@ module.exports = { } } else if (filterBy === 'issues') { filtered = filtered.filter(li => li.hasIssues) + } else if (filterBy === 'feed-open') { + filtered = filtered.filter(li => feedsArray.some(feed => feed.entityId === li.id)) } return filtered