Fixed AncestorIds and applied review comments

This commit is contained in:
JPVenson
2024-10-09 23:19:24 +00:00
parent eb601e944c
commit 2955f2f562
16 changed files with 3275 additions and 181 deletions

View File

@@ -70,7 +70,8 @@ public class MediaStreamRepository(IDbContextFactory<JellyfinDbContext> dbProvid
if (filter.Type.HasValue)
{
query = query.Where(e => e.StreamType == filter.Type.ToString());
var typeValue = (MediaStreamTypeEntity)filter.Type.Value;
query = query.Where(e => e.StreamType!.Value == typeValue);
}
return query;
@@ -82,7 +83,7 @@ public class MediaStreamRepository(IDbContextFactory<JellyfinDbContext> dbProvid
dto.Index = entity.StreamIndex;
if (entity.StreamType != null)
{
dto.Type = Enum.Parse<MediaStreamType>(entity.StreamType);
dto.Type = (MediaStreamType)entity.StreamType;
}
dto.IsAVC = entity.IsAvc;
@@ -151,7 +152,7 @@ public class MediaStreamRepository(IDbContextFactory<JellyfinDbContext> dbProvid
Item = null!,
ItemId = itemId,
StreamIndex = dto.Index,
StreamType = dto.Type.ToString(),
StreamType = (MediaStreamTypeEntity)dto.Type,
IsAvc = dto.IsAVC.GetValueOrDefault(),
Codec = dto.Codec,