diff --git a/client/components/content/LibraryItemDetails.vue b/client/components/content/LibraryItemDetails.vue index 0b69b038..7c6ac222 100644 --- a/client/components/content/LibraryItemDetails.vue +++ b/client/components/content/LibraryItemDetails.vue @@ -89,7 +89,7 @@ -
+
{{ $strings.LabelLanguage }}
diff --git a/client/components/controls/LibraryFilterSelect.vue b/client/components/controls/LibraryFilterSelect.vue index 04dd11af..e5464293 100644 --- a/client/components/controls/LibraryFilterSelect.vue +++ b/client/components/controls/LibraryFilterSelect.vue @@ -235,6 +235,11 @@ export default { value: 'tags', sublist: true }, + { + text: this.$strings.LabelLanguage, + value: 'languages', + sublist: true + }, { text: this.$strings.ButtonIssues, value: 'issues', diff --git a/server/utils/queries/libraryFilters.js b/server/utils/queries/libraryFilters.js index 288ee6db..a2efb664 100644 --- a/server/utils/queries/libraryFilters.js +++ b/server/utils/queries/libraryFilters.js @@ -451,7 +451,7 @@ module.exports = { libraryId: libraryId } }, - attributes: ['tags', 'genres'] + attributes: ['tags', 'genres', 'language'] }) for (const podcast of podcasts) { if (podcast.tags?.length) { @@ -460,6 +460,9 @@ module.exports = { if (podcast.genres?.length) { podcast.genres.forEach((genre) => data.genres.add(genre)) } + if (podcast.language) { + data.languages.add(podcast.language) + } } } else { const books = await Database.bookModel.findAll({ diff --git a/server/utils/queries/libraryItemsPodcastFilters.js b/server/utils/queries/libraryItemsPodcastFilters.js index 7665c89b..3e6e337c 100644 --- a/server/utils/queries/libraryItemsPodcastFilters.js +++ b/server/utils/queries/libraryItemsPodcastFilters.js @@ -51,6 +51,8 @@ module.exports = { [Sequelize.Op.gte]: 1 }) replacements.filterValue = value + } else if (group === 'languages') { + mediaWhere['language'] = value } return {