mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-11-07 08:34:10 +01:00
Add:Podcast library filter for languages and show language on podcast item page
This commit is contained in:
parent
04993dd63d
commit
e60d2a9858
@ -89,7 +89,7 @@
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="language && !isPodcast" class="flex py-0.5">
|
||||
<div v-if="language" class="flex py-0.5">
|
||||
<div class="w-24 min-w-24 sm:w-32 sm:min-w-32">
|
||||
<span class="text-white text-opacity-60 uppercase text-sm">{{ $strings.LabelLanguage }}</span>
|
||||
</div>
|
||||
|
@ -235,6 +235,11 @@ export default {
|
||||
value: 'tags',
|
||||
sublist: true
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelLanguage,
|
||||
value: 'languages',
|
||||
sublist: true
|
||||
},
|
||||
{
|
||||
text: this.$strings.ButtonIssues,
|
||||
value: 'issues',
|
||||
|
@ -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({
|
||||
|
@ -51,6 +51,8 @@ module.exports = {
|
||||
[Sequelize.Op.gte]: 1
|
||||
})
|
||||
replacements.filterValue = value
|
||||
} else if (group === 'languages') {
|
||||
mediaWhere['language'] = value
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user