mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Support Frontend audio language filter selection jellyfin#617
Show audio languages filter if any have been received in get filters call Localized audio languages filter header in three languages
This commit is contained in:
parent
4678528d00
commit
11cedaa7e4
@ -21,6 +21,8 @@ define(["dialogHelper", "globalize", "connectionManager", "events", "browser", "
|
|||||||
return -1 != ("|" + (query.Tags || "") + "|").indexOf("|" + i + "|")
|
return -1 != ("|" + (query.Tags || "") + "|").indexOf("|" + i + "|")
|
||||||
}), renderOptions(context, ".yearFilters", "chkYearFilter", result.Years, function(i) {
|
}), renderOptions(context, ".yearFilters", "chkYearFilter", result.Years, function(i) {
|
||||||
return -1 != ("," + (query.Years || "") + ",").indexOf("," + i + ",")
|
return -1 != ("," + (query.Years || "") + ",").indexOf("," + i + ",")
|
||||||
|
}), renderOptions(context, ".audioLanguagesFilters", "chkAudioLanguagesFilter", result.AudioLanguages, function(i) {
|
||||||
|
return -1 != ("," + (query.AudioLanguages || "") + ",").indexOf("," + i + ",")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +71,7 @@ define(["dialogHelper", "globalize", "connectionManager", "events", "browser", "
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setVisibility(context, options) {
|
function setVisibility(context, options) {
|
||||||
"livetvchannels" != options.mode && "albums" != options.mode && "artists" != options.mode && "albumartists" != options.mode && "songs" != options.mode || hideByClass(context, "videoStandard"), enableDynamicFilters(options.mode) && (context.querySelector(".genreFilters").classList.remove("hide"), context.querySelector(".officialRatingFilters").classList.remove("hide"), context.querySelector(".tagFilters").classList.remove("hide"), context.querySelector(".yearFilters").classList.remove("hide")), "movies" != options.mode && "episodes" != options.mode || context.querySelector(".videoTypeFilters").classList.remove("hide"), options.mode, "movies" != options.mode && "series" != options.mode && "games" != options.mode && "episodes" != options.mode || context.querySelector(".features").classList.remove("hide"), "series" == options.mode && context.querySelector(".seriesStatus").classList.remove("hide"), "episodes" == options.mode && showByClass(context, "episodeFilter")
|
"livetvchannels" != options.mode && "albums" != options.mode && "artists" != options.mode && "albumartists" != options.mode && "songs" != options.mode || hideByClass(context, "videoStandard"), enableDynamicFilters(options.mode) && (context.querySelector(".genreFilters").classList.remove("hide"), context.querySelector(".officialRatingFilters").classList.remove("hide"), context.querySelector(".tagFilters").classList.remove("hide"), context.querySelector(".yearFilters").classList.remove("hide"), context.querySelector(".audioLanguagesFilters").classList.remove("hide")), "movies" != options.mode && "episodes" != options.mode || context.querySelector(".videoTypeFilters").classList.remove("hide"), options.mode, "movies" != options.mode && "series" != options.mode && "games" != options.mode && "episodes" != options.mode || context.querySelector(".features").classList.remove("hide"), "series" == options.mode && context.querySelector(".seriesStatus").classList.remove("hide"), "episodes" == options.mode && showByClass(context, "episodeFilter")
|
||||||
}
|
}
|
||||||
|
|
||||||
function showByClass(context, className) {
|
function showByClass(context, className) {
|
||||||
@ -169,6 +171,13 @@ define(["dialogHelper", "globalize", "connectionManager", "events", "browser", "
|
|||||||
delimiter = ",";
|
delimiter = ",";
|
||||||
return filters = (delimiter + filters).replace(delimiter + filterName, "").substring(1), chkYearFilter.checked && (filters = filters ? filters + delimiter + filterName : filterName), query.StartIndex = 0, query.Years = filters, void triggerChange(self)
|
return filters = (delimiter + filters).replace(delimiter + filterName, "").substring(1), chkYearFilter.checked && (filters = filters ? filters + delimiter + filterName : filterName), query.StartIndex = 0, query.Years = filters, void triggerChange(self)
|
||||||
}
|
}
|
||||||
|
var chkAudioLanguagesFilter = parentWithClass(e.target, "chkAudioLanguagesFilter");
|
||||||
|
if (chkAudioLanguagesFilter) {
|
||||||
|
var filterName = chkAudioLanguagesFilter.getAttribute("data-filter"),
|
||||||
|
filters = query.AudioLanguages || "",
|
||||||
|
delimiter = ",";
|
||||||
|
return filters = (delimiter + filters).replace(delimiter + filterName, "").substring(1), chkAudioLanguagesFilter.checked && (filters = filters ? filters + delimiter + filterName : filterName), query.StartIndex = 0, query.AudioLanguages = filters, void triggerChange(self)
|
||||||
|
}
|
||||||
var chkOfficialRatingFilter = parentWithClass(e.target, "chkOfficialRatingFilter");
|
var chkOfficialRatingFilter = parentWithClass(e.target, "chkOfficialRatingFilter");
|
||||||
if (chkOfficialRatingFilter) {
|
if (chkOfficialRatingFilter) {
|
||||||
var filterName = chkOfficialRatingFilter.getAttribute("data-filter"),
|
var filterName = chkOfficialRatingFilter.getAttribute("data-filter"),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div style="margin: 0;padding:1.5em 2em;" class="filterDialogContent">
|
<div style="margin: 0;padding:1.5em 2em;" class="filterDialogContent">
|
||||||
<h2 style="margin-bottom: .25em;">
|
<h2 style="margin-bottom: .25em;">
|
||||||
${HeaderFilters}
|
${HeaderFilters}
|
||||||
</h2>
|
</h2>
|
||||||
@ -151,4 +151,9 @@
|
|||||||
<div class="collapseContent filterOptions">
|
<div class="collapseContent filterOptions">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div is="emby-collapse" title="${HeaderAudioLanguages}" class="audioLanguagesFilters hide">
|
||||||
|
<div class="collapseContent filterOptions">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -271,6 +271,7 @@
|
|||||||
"HeaderApiKeysHelp": "Externe Applikationen benötigen einen API Key um mit Jellyfin Server zu kommunizieren. API Keys werden beim loggin mit einem Jellyfin Konto vergeben oder durch eine manuelle Freigabe.",
|
"HeaderApiKeysHelp": "Externe Applikationen benötigen einen API Key um mit Jellyfin Server zu kommunizieren. API Keys werden beim loggin mit einem Jellyfin Konto vergeben oder durch eine manuelle Freigabe.",
|
||||||
"HeaderApp": "App",
|
"HeaderApp": "App",
|
||||||
"HeaderAudio": "Audio",
|
"HeaderAudio": "Audio",
|
||||||
|
"HeaderAudioLanguages": "Audiosprachen",
|
||||||
"HeaderAudioSettings": "Audioeinstellungen",
|
"HeaderAudioSettings": "Audioeinstellungen",
|
||||||
"HeaderAudioTracks": "Audiospuren",
|
"HeaderAudioTracks": "Audiospuren",
|
||||||
"HeaderAutomaticUpdates": "Automatische Updates",
|
"HeaderAutomaticUpdates": "Automatische Updates",
|
||||||
|
@ -271,6 +271,7 @@
|
|||||||
"HeaderApiKeysHelp": "External applications are required to have an Api key in order to communicate with Jellyfin Server. Keys are issued by logging in with an Jellyfin account, or by manually granting the application a key.",
|
"HeaderApiKeysHelp": "External applications are required to have an Api key in order to communicate with Jellyfin Server. Keys are issued by logging in with an Jellyfin account, or by manually granting the application a key.",
|
||||||
"HeaderApp": "App",
|
"HeaderApp": "App",
|
||||||
"HeaderAudio": "Audio",
|
"HeaderAudio": "Audio",
|
||||||
|
"HeaderAudioLanguages": "Audio Languages",
|
||||||
"HeaderAudioSettings": "Audio Settings",
|
"HeaderAudioSettings": "Audio Settings",
|
||||||
"HeaderAudioTracks": "Audio Tracks",
|
"HeaderAudioTracks": "Audio Tracks",
|
||||||
"HeaderAutomaticUpdates": "Automatic Updates",
|
"HeaderAutomaticUpdates": "Automatic Updates",
|
||||||
|
@ -271,6 +271,7 @@
|
|||||||
"HeaderApiKeysHelp": "Les applications externes ont besoin d'une clé d'API pour communiquer avec le serveur Jellyfin. Les clés sont distribuées lors d'une connexion avec un compte Jellyfin, ou bien en accordant manuellement une clé à une application.",
|
"HeaderApiKeysHelp": "Les applications externes ont besoin d'une clé d'API pour communiquer avec le serveur Jellyfin. Les clés sont distribuées lors d'une connexion avec un compte Jellyfin, ou bien en accordant manuellement une clé à une application.",
|
||||||
"HeaderApp": "Application",
|
"HeaderApp": "Application",
|
||||||
"HeaderAudio": "Audio",
|
"HeaderAudio": "Audio",
|
||||||
|
"HeaderAudioLanguages": "Langues audio",
|
||||||
"HeaderAudioSettings": "Paramètres audio",
|
"HeaderAudioSettings": "Paramètres audio",
|
||||||
"HeaderAudioTracks": "Pistes audio",
|
"HeaderAudioTracks": "Pistes audio",
|
||||||
"HeaderAutomaticUpdates": "Mises à jour automatiques",
|
"HeaderAutomaticUpdates": "Mises à jour automatiques",
|
||||||
|
Loading…
Reference in New Issue
Block a user