|
|
|
@ -14,6 +14,7 @@ using ErsatzTV.Core.Scheduling; |
|
|
|
using ErsatzTV.Infrastructure.Data; |
|
|
|
using ErsatzTV.Infrastructure.Data; |
|
|
|
using ErsatzTV.Infrastructure.Extensions; |
|
|
|
using ErsatzTV.Infrastructure.Extensions; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
|
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
|
|
|
|
|
|
|
|
namespace ErsatzTV.Application.Streaming; |
|
|
|
namespace ErsatzTV.Application.Streaming; |
|
|
|
|
|
|
|
|
|
|
|
@ -24,6 +25,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler< |
|
|
|
private readonly IFFmpegProcessService _ffmpegProcessService; |
|
|
|
private readonly IFFmpegProcessService _ffmpegProcessService; |
|
|
|
private readonly IJellyfinPathReplacementService _jellyfinPathReplacementService; |
|
|
|
private readonly IJellyfinPathReplacementService _jellyfinPathReplacementService; |
|
|
|
private readonly ILocalFileSystem _localFileSystem; |
|
|
|
private readonly ILocalFileSystem _localFileSystem; |
|
|
|
|
|
|
|
private readonly ILogger<GetPlayoutItemProcessByChannelNumberHandler> _logger; |
|
|
|
private readonly IMediaCollectionRepository _mediaCollectionRepository; |
|
|
|
private readonly IMediaCollectionRepository _mediaCollectionRepository; |
|
|
|
private readonly IPlexPathReplacementService _plexPathReplacementService; |
|
|
|
private readonly IPlexPathReplacementService _plexPathReplacementService; |
|
|
|
private readonly ISongVideoGenerator _songVideoGenerator; |
|
|
|
private readonly ISongVideoGenerator _songVideoGenerator; |
|
|
|
@ -39,7 +41,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler< |
|
|
|
IMediaCollectionRepository mediaCollectionRepository, |
|
|
|
IMediaCollectionRepository mediaCollectionRepository, |
|
|
|
ITelevisionRepository televisionRepository, |
|
|
|
ITelevisionRepository televisionRepository, |
|
|
|
IArtistRepository artistRepository, |
|
|
|
IArtistRepository artistRepository, |
|
|
|
ISongVideoGenerator songVideoGenerator) |
|
|
|
ISongVideoGenerator songVideoGenerator, |
|
|
|
|
|
|
|
ILogger<GetPlayoutItemProcessByChannelNumberHandler> logger) |
|
|
|
: base(dbContextFactory) |
|
|
|
: base(dbContextFactory) |
|
|
|
{ |
|
|
|
{ |
|
|
|
_ffmpegProcessService = ffmpegProcessService; |
|
|
|
_ffmpegProcessService = ffmpegProcessService; |
|
|
|
@ -51,6 +54,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler< |
|
|
|
_televisionRepository = televisionRepository; |
|
|
|
_televisionRepository = televisionRepository; |
|
|
|
_artistRepository = artistRepository; |
|
|
|
_artistRepository = artistRepository; |
|
|
|
_songVideoGenerator = songVideoGenerator; |
|
|
|
_songVideoGenerator = songVideoGenerator; |
|
|
|
|
|
|
|
_logger = logger; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected override async Task<Either<BaseError, PlayoutItemProcessModel>> GetProcess( |
|
|
|
protected override async Task<Either<BaseError, PlayoutItemProcessModel>> GetProcess( |
|
|
|
@ -201,6 +205,12 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler< |
|
|
|
|
|
|
|
|
|
|
|
DateTimeOffset finish = maybeDuration.Match(d => now.Add(d), () => now); |
|
|
|
DateTimeOffset finish = maybeDuration.Match(d => now.Add(d), () => now); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogWarning( |
|
|
|
|
|
|
|
"Error locating playout item {@Error}. Will display error from {Start} to {Finish}", |
|
|
|
|
|
|
|
error, |
|
|
|
|
|
|
|
now, |
|
|
|
|
|
|
|
finish); |
|
|
|
|
|
|
|
|
|
|
|
switch (error) |
|
|
|
switch (error) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case UnableToLocatePlayoutItem: |
|
|
|
case UnableToLocatePlayoutItem: |
|
|
|
|