mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +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>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<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>
|
<span class="text-white text-opacity-60 uppercase text-sm">{{ $strings.LabelLanguage }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -235,6 +235,11 @@ export default {
|
|||||||
value: 'tags',
|
value: 'tags',
|
||||||
sublist: true
|
sublist: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: this.$strings.LabelLanguage,
|
||||||
|
value: 'languages',
|
||||||
|
sublist: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: this.$strings.ButtonIssues,
|
text: this.$strings.ButtonIssues,
|
||||||
value: 'issues',
|
value: 'issues',
|
||||||
|
@ -451,7 +451,7 @@ module.exports = {
|
|||||||
libraryId: libraryId
|
libraryId: libraryId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
attributes: ['tags', 'genres']
|
attributes: ['tags', 'genres', 'language']
|
||||||
})
|
})
|
||||||
for (const podcast of podcasts) {
|
for (const podcast of podcasts) {
|
||||||
if (podcast.tags?.length) {
|
if (podcast.tags?.length) {
|
||||||
@ -460,6 +460,9 @@ module.exports = {
|
|||||||
if (podcast.genres?.length) {
|
if (podcast.genres?.length) {
|
||||||
podcast.genres.forEach((genre) => data.genres.add(genre))
|
podcast.genres.forEach((genre) => data.genres.add(genre))
|
||||||
}
|
}
|
||||||
|
if (podcast.language) {
|
||||||
|
data.languages.add(podcast.language)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const books = await Database.bookModel.findAll({
|
const books = await Database.bookModel.findAll({
|
||||||
|
@ -51,6 +51,8 @@ module.exports = {
|
|||||||
[Sequelize.Op.gte]: 1
|
[Sequelize.Op.gte]: 1
|
||||||
})
|
})
|
||||||
replacements.filterValue = value
|
replacements.filterValue = value
|
||||||
|
} else if (group === 'languages') {
|
||||||
|
mediaWhere['language'] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user