aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
diff options
context:
space:
mode:
authorJPVenson <github@jpb.email>2024-10-09 23:19:24 +0000
committerJPVenson <github@jpb.email>2024-10-09 23:19:24 +0000
commit2955f2f56275fca01cd3f586b3475dcdfbea78ed (patch)
treec9202c3ad903e704058c9d9b745ef90d1c150ca9 /Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
parenteb601e944cd392a8007b540ab5627977a37368c6 (diff)
Fixed AncestorIds and applied review comments
Diffstat (limited to 'Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs')
-rw-r--r--Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
index df434fdb3..203071a6e 100644
--- a/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
+++ b/Jellyfin.Server.Implementations/Item/MediaStreamRepository.cs
@@ -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,