diff --git a/src/components/filterdialog/filterdialog.js b/src/components/filterdialog/filterdialog.js index 560919889e..bd0cd7820f 100644 --- a/src/components/filterdialog/filterdialog.js +++ b/src/components/filterdialog/filterdialog.js @@ -21,6 +21,8 @@ define(["dialogHelper", "globalize", "connectionManager", "events", "browser", " return -1 != ("|" + (query.Tags || "") + "|").indexOf("|" + i + "|") }), renderOptions(context, ".yearFilters", "chkYearFilter", result.Years, function(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) { - "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) { @@ -169,6 +171,13 @@ define(["dialogHelper", "globalize", "connectionManager", "events", "browser", " 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) } + 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"); if (chkOfficialRatingFilter) { var filterName = chkOfficialRatingFilter.getAttribute("data-filter"), diff --git a/src/components/filterdialog/filterdialog.template.html b/src/components/filterdialog/filterdialog.template.html index 9eb7416207..9c0c15e69a 100644 --- a/src/components/filterdialog/filterdialog.template.html +++ b/src/components/filterdialog/filterdialog.template.html @@ -1,4 +1,4 @@ -