mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-01 11:52:52 +01:00
move language filters from QueryFiltersLegacy to QueryFilters
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user