Browse Source

fix yaml playout builds (#2241)

pull/2243/head
Jason Dove 2 weeks ago committed by GitHub
parent
commit
f04b7ead09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutAllHandler.cs
  2. 7
      ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutContentHandler.cs
  3. 3
      ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutCountHandler.cs
  4. 4
      ErsatzTV.Infrastructure/Data/Repositories/ChannelRepository.cs
  5. 1
      ErsatzTV.Infrastructure/Data/Repositories/ConfigElementRepository.cs
  6. 30
      ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs

3
ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutAllHandler.cs

@ -46,7 +46,6 @@ public class YamlPlayoutAllHandler(EnumeratorCache enumeratorCache) : YamlPlayou
// create a playout item // create a playout item
var playoutItem = new PlayoutItem var playoutItem = new PlayoutItem
{ {
MediaItem = mediaItem,
MediaItemId = mediaItem.Id, MediaItemId = mediaItem.Id,
Start = context.CurrentTime.UtcDateTime, Start = context.CurrentTime.UtcDateTime,
Finish = context.CurrentTime.UtcDateTime + itemDuration, Finish = context.CurrentTime.UtcDateTime + itemDuration,
@ -72,7 +71,7 @@ public class YamlPlayoutAllHandler(EnumeratorCache enumeratorCache) : YamlPlayou
playoutItem.WatermarkId = watermarkId; playoutItem.WatermarkId = watermarkId;
} }
await AddItemAndMidRoll(context, playoutItem, executeSequence); await AddItemAndMidRoll(context, playoutItem, mediaItem, executeSequence);
context.AdvanceGuideGroup(); context.AdvanceGuideGroup();
// create history record // create history record

7
ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutContentHandler.cs

@ -170,10 +170,13 @@ public abstract class YamlPlayoutContentHandler(EnumeratorCache enumeratorCache)
return Optional(version.Chapters).Flatten().OrderBy(c => c.StartTime).ToList(); return Optional(version.Chapters).Flatten().OrderBy(c => c.StartTime).ToList();
} }
protected static async Task AddItemAndMidRoll(YamlPlayoutContext context, PlayoutItem playoutItem, protected static async Task AddItemAndMidRoll(
YamlPlayoutContext context,
PlayoutItem playoutItem,
MediaItem mediaItem,
Func<string, Task> executeSequence) Func<string, Task> executeSequence)
{ {
List<MediaChapter> itemChapters = ChaptersForMediaItem(playoutItem.MediaItem); List<MediaChapter> itemChapters = ChaptersForMediaItem(mediaItem);
Option<YamlPlayoutContext.MidRollSequence> maybeMidRollSequence = context.GetMidRollSequence(); Option<YamlPlayoutContext.MidRollSequence> maybeMidRollSequence = context.GetMidRollSequence();
if (itemChapters.Count < 2 || maybeMidRollSequence.IsNone) if (itemChapters.Count < 2 || maybeMidRollSequence.IsNone)
{ {

3
ErsatzTV.Core/Scheduling/YamlScheduling/Handlers/YamlPlayoutCountHandler.cs

@ -71,7 +71,6 @@ public class YamlPlayoutCountHandler(EnumeratorCache enumeratorCache) : YamlPlay
// create a playout item // create a playout item
var playoutItem = new PlayoutItem var playoutItem = new PlayoutItem
{ {
MediaItem = mediaItem,
MediaItemId = mediaItem.Id, MediaItemId = mediaItem.Id,
Start = context.CurrentTime.UtcDateTime, Start = context.CurrentTime.UtcDateTime,
Finish = context.CurrentTime.UtcDateTime + itemDuration, Finish = context.CurrentTime.UtcDateTime + itemDuration,
@ -97,7 +96,7 @@ public class YamlPlayoutCountHandler(EnumeratorCache enumeratorCache) : YamlPlay
playoutItem.WatermarkId = watermarkId; playoutItem.WatermarkId = watermarkId;
} }
await AddItemAndMidRoll(context, playoutItem, executeSequence); await AddItemAndMidRoll(context, playoutItem, mediaItem, executeSequence);
context.AdvanceGuideGroup(); context.AdvanceGuideGroup();
// create history record // create history record

4
ErsatzTV.Infrastructure/Data/Repositories/ChannelRepository.cs

@ -15,6 +15,7 @@ public class ChannelRepository : IChannelRepository
{ {
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
return await dbContext.Channels return await dbContext.Channels
.AsNoTracking()
.Include(c => c.Artwork) .Include(c => c.Artwork)
.Include(c => c.Watermark) .Include(c => c.Watermark)
.OrderBy(c => c.Id) .OrderBy(c => c.Id)
@ -26,6 +27,7 @@ public class ChannelRepository : IChannelRepository
{ {
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
return await dbContext.Channels return await dbContext.Channels
.AsNoTracking()
.Include(c => c.FFmpegProfile) .Include(c => c.FFmpegProfile)
.ThenInclude(p => p.Resolution) .ThenInclude(p => p.Resolution)
.Include(c => c.Artwork) .Include(c => c.Artwork)
@ -39,6 +41,7 @@ public class ChannelRepository : IChannelRepository
{ {
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
return await dbContext.Channels return await dbContext.Channels
.AsNoTracking()
.Include(c => c.FFmpegProfile) .Include(c => c.FFmpegProfile)
.Include(c => c.Artwork) .Include(c => c.Artwork)
.Include(c => c.Playouts) .Include(c => c.Playouts)
@ -50,6 +53,7 @@ public class ChannelRepository : IChannelRepository
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
List<ChannelWatermark> maybeWatermarks = await dbContext.ChannelWatermarks List<ChannelWatermark> maybeWatermarks = await dbContext.ChannelWatermarks
.AsNoTracking()
.Where(cw => EF.Functions.Like( .Where(cw => EF.Functions.Like(
EF.Functions.Collate(cw.Name, TvContext.CaseInsensitiveCollation), EF.Functions.Collate(cw.Name, TvContext.CaseInsensitiveCollation),
$"%{name}%")) $"%{name}%"))

1
ErsatzTV.Infrastructure/Data/Repositories/ConfigElementRepository.cs

@ -45,6 +45,7 @@ public class ConfigElementRepository : IConfigElementRepository
{ {
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
return await dbContext.ConfigElements return await dbContext.ConfigElements
.AsNoTracking()
.OrderBy(ce => ce.Key) .OrderBy(ce => ce.Key)
.SingleOrDefaultAsync(ce => ce.Key == key.Key) .SingleOrDefaultAsync(ce => ce.Key == key.Key)
.Map(Optional); .Map(Optional);

30
ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs

@ -35,6 +35,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
var result = new Dictionary<PlaylistItem, List<MediaItem>>(); var result = new Dictionary<PlaylistItem, List<MediaItem>>();
Option<Playlist> maybePlaylist = await dbContext.Playlists Option<Playlist> maybePlaylist = await dbContext.Playlists
.AsNoTracking()
.Include(p => p.Items) .Include(p => p.Items)
.SelectOneAsync(p => p.Id, p => p.Id == playlistId); .SelectOneAsync(p => p.Id, p => p.Id == playlistId);
@ -169,6 +170,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
Option<Playlist> maybePlaylist = await dbContext.Playlists Option<Playlist> maybePlaylist = await dbContext.Playlists
.AsNoTracking()
.SelectOneAsync(p => p.Name, p => EF.Functions.Collate(p.Name, TvContext.CaseInsensitiveCollation) == name); .SelectOneAsync(p => p.Name, p => EF.Functions.Collate(p.Name, TvContext.CaseInsensitiveCollation) == name);
foreach (Playlist playlist in maybePlaylist) foreach (Playlist playlist in maybePlaylist)
@ -315,6 +317,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
{ {
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
return await dbContext.Collections return await dbContext.Collections
.AsNoTracking()
.Include(c => c.CollectionItems) .Include(c => c.CollectionItems)
.OrderBy(c => c.Id) .OrderBy(c => c.Id)
.SingleOrDefaultAsync(c => c.Id == id) .SingleOrDefaultAsync(c => c.Id == id)
@ -346,6 +349,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
Option<Collection> maybeCollection = await dbContext.Collections Option<Collection> maybeCollection = await dbContext.Collections
.AsNoTracking()
.SelectOneAsync(c => c.Name, c => EF.Functions.Collate(c.Name, TvContext.CaseInsensitiveCollation) == name); .SelectOneAsync(c => c.Name, c => EF.Functions.Collate(c.Name, TvContext.CaseInsensitiveCollation) == name);
foreach (Collection collection in maybeCollection) foreach (Collection collection in maybeCollection)
@ -363,6 +367,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
var result = new List<MediaItem>(); var result = new List<MediaItem>();
Option<MultiCollection> maybeMultiCollection = await dbContext.MultiCollections Option<MultiCollection> maybeMultiCollection = await dbContext.MultiCollections
.AsNoTracking()
.Include(mc => mc.Collections) .Include(mc => mc.Collections)
.Include(mc => mc.SmartCollections) .Include(mc => mc.SmartCollections)
.SelectOneAsync(mc => mc.Id, mc => mc.Id == id); .SelectOneAsync(mc => mc.Id, mc => mc.Id == id);
@ -397,6 +402,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
Option<MultiCollection> maybeCollection = await dbContext.MultiCollections Option<MultiCollection> maybeCollection = await dbContext.MultiCollections
.AsNoTracking()
.SelectOneAsync( .SelectOneAsync(
mc => mc.Name, mc => mc.Name,
mc => EF.Functions.Collate(mc.Name, TvContext.CaseInsensitiveCollation) == name); mc => EF.Functions.Collate(mc.Name, TvContext.CaseInsensitiveCollation) == name);
@ -414,6 +420,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
Option<SmartCollection> maybeCollection = await dbContext.SmartCollections Option<SmartCollection> maybeCollection = await dbContext.SmartCollections
.AsNoTracking()
.SelectOneAsync(sc => sc.Id, sc => sc.Id == id); .SelectOneAsync(sc => sc.Id, sc => sc.Id == id);
foreach (SmartCollection collection in maybeCollection) foreach (SmartCollection collection in maybeCollection)
@ -429,6 +436,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync(); await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
Option<SmartCollection> maybeCollection = await dbContext.SmartCollections Option<SmartCollection> maybeCollection = await dbContext.SmartCollections
.AsNoTracking()
.SelectOneAsync( .SelectOneAsync(
sc => sc.Name, sc => sc.Name,
sc => EF.Functions.Collate(sc.Name, TvContext.CaseInsensitiveCollation) == name); sc => EF.Functions.Collate(sc.Name, TvContext.CaseInsensitiveCollation) == name);
@ -529,6 +537,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
} }
List<int> nextIds = await dbContext.ShowMetadata List<int> nextIds = await dbContext.ShowMetadata
.AsNoTracking()
.Filter(sm => .Filter(sm =>
sm.Guids.Any(g => EF.Functions.Collate(g.Guid, TvContext.CaseInsensitiveCollation) == guid)) sm.Guids.Any(g => EF.Functions.Collate(g.Guid, TvContext.CaseInsensitiveCollation) == guid))
.Map(sm => sm.ShowId) .Map(sm => sm.ShowId)
@ -556,6 +565,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
var result = new List<CollectionWithItems>(); var result = new List<CollectionWithItems>();
Option<MultiCollection> maybeMultiCollection = await dbContext.MultiCollections Option<MultiCollection> maybeMultiCollection = await dbContext.MultiCollections
.AsNoTracking()
.Include(mc => mc.Collections) .Include(mc => mc.Collections)
.Include(mc => mc.SmartCollections) .Include(mc => mc.SmartCollections)
.Include(mc => mc.MultiCollectionItems) .Include(mc => mc.MultiCollectionItems)
@ -643,6 +653,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
var result = new List<MediaItem>(); var result = new List<MediaItem>();
Option<Playlist> maybePlaylist = await dbContext.Playlists Option<Playlist> maybePlaylist = await dbContext.Playlists
.AsNoTracking()
.Include(p => p.Items) .Include(p => p.Items)
.SelectOneAsync(p => p.Id, p => p.Id == id); .SelectOneAsync(p => p.Id, p => p.Id == id);
@ -876,25 +887,32 @@ public class MediaCollectionRepository : IMediaCollectionRepository
return emptyCollection.CollectionType switch return emptyCollection.CollectionType switch
{ {
ProgramScheduleItemCollectionType.Artist => await dbContext.Artists.Include(a => a.ArtistMetadata) ProgramScheduleItemCollectionType.Artist => await dbContext.Artists
.AsNoTracking()
.Include(a => a.ArtistMetadata)
.SelectOneAsync(a => a.Id, a => a.Id == emptyCollection.MediaItemId.Value) .SelectOneAsync(a => a.Id, a => a.Id == emptyCollection.MediaItemId.Value)
.MapT(a => a.ArtistMetadata.Head().Title), .MapT(a => a.ArtistMetadata.Head().Title),
ProgramScheduleItemCollectionType.Collection => await dbContext.Collections ProgramScheduleItemCollectionType.Collection => await dbContext.Collections
.AsNoTracking()
.SelectOneAsync(c => c.Id, c => c.Id == emptyCollection.CollectionId.Value) .SelectOneAsync(c => c.Id, c => c.Id == emptyCollection.CollectionId.Value)
.MapT(c => c.Name), .MapT(c => c.Name),
ProgramScheduleItemCollectionType.MultiCollection => await dbContext.MultiCollections ProgramScheduleItemCollectionType.MultiCollection => await dbContext.MultiCollections
.AsNoTracking()
.SelectOneAsync(c => c.Id, c => c.Id == emptyCollection.MultiCollectionId.Value) .SelectOneAsync(c => c.Id, c => c.Id == emptyCollection.MultiCollectionId.Value)
.MapT(c => c.Name), .MapT(c => c.Name),
ProgramScheduleItemCollectionType.SmartCollection => await dbContext.SmartCollections ProgramScheduleItemCollectionType.SmartCollection => await dbContext.SmartCollections
.AsNoTracking()
.SelectOneAsync(c => c.Id, c => c.Id == emptyCollection.SmartCollectionId.Value) .SelectOneAsync(c => c.Id, c => c.Id == emptyCollection.SmartCollectionId.Value)
.MapT(c => c.Name), .MapT(c => c.Name),
ProgramScheduleItemCollectionType.TelevisionSeason => await dbContext.Seasons ProgramScheduleItemCollectionType.TelevisionSeason => await dbContext.Seasons
.AsNoTracking()
.Include(s => s.SeasonMetadata) .Include(s => s.SeasonMetadata)
.Include(s => s.Show) .Include(s => s.Show)
.ThenInclude(s => s.ShowMetadata) .ThenInclude(s => s.ShowMetadata)
.SelectOneAsync(a => a.Id, a => a.Id == emptyCollection.MediaItemId.Value) .SelectOneAsync(a => a.Id, a => a.Id == emptyCollection.MediaItemId.Value)
.MapT(s => $"{s.Show.ShowMetadata.Head().Title} Season {s.SeasonNumber}"), .MapT(s => $"{s.Show.ShowMetadata.Head().Title} Season {s.SeasonNumber}"),
ProgramScheduleItemCollectionType.TelevisionShow => await dbContext.Shows.Include(s => s.ShowMetadata) ProgramScheduleItemCollectionType.TelevisionShow => await dbContext.Shows.Include(s => s.ShowMetadata)
.AsNoTracking()
.SelectOneAsync(a => a.Id, a => a.Id == emptyCollection.MediaItemId.Value) .SelectOneAsync(a => a.Id, a => a.Id == emptyCollection.MediaItemId.Value)
.MapT(s => s.ShowMetadata.Head().Title), .MapT(s => s.ShowMetadata.Head().Title),
// TODO: get playlist name // TODO: get playlist name
@ -1049,6 +1067,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<Movie>> GetMovieItems(TvContext dbContext, IEnumerable<int> movieIds) => private static Task<List<Movie>> GetMovieItems(TvContext dbContext, IEnumerable<int> movieIds) =>
dbContext.Movies dbContext.Movies
.AsNoTracking()
.Include(m => m.MovieMetadata) .Include(m => m.MovieMetadata)
.ThenInclude(mm => mm.Subtitles) .ThenInclude(mm => mm.Subtitles)
.Include(m => m.MediaVersions) .Include(m => m.MediaVersions)
@ -1074,6 +1093,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
TvContext dbContext, TvContext dbContext,
IEnumerable<int> musicVideoIds) => IEnumerable<int> musicVideoIds) =>
dbContext.MusicVideos dbContext.MusicVideos
.AsNoTracking()
.Include(m => m.Artist) .Include(m => m.Artist)
.ThenInclude(a => a.ArtistMetadata) .ThenInclude(a => a.ArtistMetadata)
.Include(m => m.MusicVideoMetadata) .Include(m => m.MusicVideoMetadata)
@ -1109,6 +1129,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<MusicVideo>> GetMusicVideoItems(TvContext dbContext, IEnumerable<int> musicVideoIds) => private static Task<List<MusicVideo>> GetMusicVideoItems(TvContext dbContext, IEnumerable<int> musicVideoIds) =>
dbContext.MusicVideos dbContext.MusicVideos
.AsNoTracking()
.Include(m => m.Artist) .Include(m => m.Artist)
.ThenInclude(a => a.ArtistMetadata) .ThenInclude(a => a.ArtistMetadata)
.Include(m => m.MusicVideoMetadata) .Include(m => m.MusicVideoMetadata)
@ -1135,6 +1156,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<OtherVideo>> GetOtherVideoItems(TvContext dbContext, IEnumerable<int> otherVideoIds) => private static Task<List<OtherVideo>> GetOtherVideoItems(TvContext dbContext, IEnumerable<int> otherVideoIds) =>
dbContext.OtherVideos dbContext.OtherVideos
.AsNoTracking()
.Include(m => m.OtherVideoMetadata) .Include(m => m.OtherVideoMetadata)
.ThenInclude(ovm => ovm.Subtitles) .ThenInclude(ovm => ovm.Subtitles)
.Include(m => m.MediaVersions) .Include(m => m.MediaVersions)
@ -1157,6 +1179,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<Song>> GetSongItems(TvContext dbContext, IEnumerable<int> songIds) => private static Task<List<Song>> GetSongItems(TvContext dbContext, IEnumerable<int> songIds) =>
dbContext.Songs dbContext.Songs
.AsNoTracking()
.Include(m => m.SongMetadata) .Include(m => m.SongMetadata)
.ThenInclude(s => s.Subtitles) .ThenInclude(s => s.Subtitles)
.Include(m => m.MediaVersions) .Include(m => m.MediaVersions)
@ -1179,6 +1202,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<Image>> GetImageItems(TvContext dbContext, IEnumerable<int> imageIds) => private static Task<List<Image>> GetImageItems(TvContext dbContext, IEnumerable<int> imageIds) =>
dbContext.Images dbContext.Images
.AsNoTracking()
.Include(m => m.ImageMetadata) .Include(m => m.ImageMetadata)
.ThenInclude(im => im.Subtitles) .ThenInclude(im => im.Subtitles)
.Include(m => m.MediaVersions) .Include(m => m.MediaVersions)
@ -1201,6 +1225,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<RemoteStream>> GetRemoteStreamItems(TvContext dbContext, IEnumerable<int> remoteStreamIds) => private static Task<List<RemoteStream>> GetRemoteStreamItems(TvContext dbContext, IEnumerable<int> remoteStreamIds) =>
dbContext.RemoteStreams dbContext.RemoteStreams
.AsNoTracking()
.Include(m => m.RemoteStreamMetadata) .Include(m => m.RemoteStreamMetadata)
.ThenInclude(im => im.Subtitles) .ThenInclude(im => im.Subtitles)
.Include(m => m.MediaVersions) .Include(m => m.MediaVersions)
@ -1227,6 +1252,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<Episode>> GetShowItemsFromEpisodeIds(TvContext dbContext, IEnumerable<int> episodeIds) => private static Task<List<Episode>> GetShowItemsFromEpisodeIds(TvContext dbContext, IEnumerable<int> episodeIds) =>
dbContext.Episodes dbContext.Episodes
.AsNoTracking()
.Include(e => e.EpisodeMetadata) .Include(e => e.EpisodeMetadata)
.ThenInclude(em => em.Subtitles) .ThenInclude(em => em.Subtitles)
.Include(e => e.MediaVersions) .Include(e => e.MediaVersions)
@ -1265,6 +1291,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<Episode>> GetSeasonItemsFromEpisodeIds(TvContext dbContext, IEnumerable<int> episodeIds) => private static Task<List<Episode>> GetSeasonItemsFromEpisodeIds(TvContext dbContext, IEnumerable<int> episodeIds) =>
dbContext.Episodes dbContext.Episodes
.AsNoTracking()
.Include(e => e.EpisodeMetadata) .Include(e => e.EpisodeMetadata)
.ThenInclude(em => em.Subtitles) .ThenInclude(em => em.Subtitles)
.Include(e => e.MediaVersions) .Include(e => e.MediaVersions)
@ -1301,6 +1328,7 @@ public class MediaCollectionRepository : IMediaCollectionRepository
private static Task<List<Episode>> GetEpisodeItems(TvContext dbContext, IEnumerable<int> episodeIds) => private static Task<List<Episode>> GetEpisodeItems(TvContext dbContext, IEnumerable<int> episodeIds) =>
dbContext.Episodes dbContext.Episodes
.AsNoTracking()
.Include(e => e.EpisodeMetadata) .Include(e => e.EpisodeMetadata)
.ThenInclude(em => em.Subtitles) .ThenInclude(em => em.Subtitles)
.Include(e => e.MediaVersions) .Include(e => e.MediaVersions)

Loading…
Cancel
Save