aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
diff options
context:
space:
mode:
authorTheMelmacian <76712303+TheMelmacian@users.noreply.github.com>2026-05-12 01:47:07 +0200
committerTheMelmacian <76712303+TheMelmacian@users.noreply.github.com>2026-05-12 02:12:14 +0200
commit39049a726e1a88e8acf1d8cc5c217bc8d86be9ae (patch)
tree5239b36e5511781bbb4abea70054b3c7600bbb92 /Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
parent5701cdce684dbbcdfdd5cc4c79586fe623e9f2d0 (diff)
move language filters from QueryFiltersLegacy to QueryFilters
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
index dd0446f49a..7fa33c8639 100644
--- a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
@@ -55,6 +55,17 @@ public class MediaStreamRepository : IMediaStreamRepository
return TranslateQuery(context.MediaStreamInfos.AsNoTracking(), filter).AsEnumerable().Select(Map).ToArray();
}
+ /// <inheritdoc />
+ public IReadOnlyList<string> GetMediaStreamLanguages(MediaStreamType mediaStreamType)
+ {
+ using var context = _dbProvider.CreateDbContext();
+ return context.MediaStreamInfos
+ .Where(e => e.StreamType == (MediaStreamTypeEntity)mediaStreamType)
+ .Select(s => string.IsNullOrEmpty(s.Language) ? "und" : s.Language) // und = undetermined
+ .Distinct()
+ .ToArray();
+ }
+
private string? GetPathToSave(string? path)
{
if (path is null)