Browse Source

fix transcoding tests (#2675) [no ci]

pull/2678/head
Jason Dove 1 month ago committed by GitHub
parent
commit
73aabdabda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      ErsatzTV.Scanner.Tests/Core/FFmpeg/TranscodingTests.cs

10
ErsatzTV.Scanner.Tests/Core/FFmpeg/TranscodingTests.cs

@ -242,7 +242,7 @@ public class TranscodingTests
var fileSystem = new MockFileSystem(); var fileSystem = new MockFileSystem();
var tempFilePool = new TempFilePool(); var tempFilePool = new TempFilePool();
ImageCache mockImageCache = Substitute.For<ImageCache>(localFileSystem, tempFilePool); ImageCache mockImageCache = Substitute.For<ImageCache>(fileSystem, localFileSystem, tempFilePool);
// always return the static watermark resource // always return the static watermark resource
mockImageCache.GetPathForImage( mockImageCache.GetPathForImage(
@ -682,7 +682,7 @@ public class TranscodingTests
var tempFilePool = new TempFilePool(); var tempFilePool = new TempFilePool();
ImageCache mockImageCache = Substitute.For<ImageCache>(localFileSystem, tempFilePool); ImageCache mockImageCache = Substitute.For<ImageCache>(fileSystem, localFileSystem, tempFilePool);
// always return the static watermark resource // always return the static watermark resource
mockImageCache.GetPathForImage( mockImageCache.GetPathForImage(
@ -702,13 +702,15 @@ public class TranscodingTests
watermarks.AddRange(watermarkSelector.GetWatermarkOptions(channel, wm, Option<ChannelWatermark>.None)); watermarks.AddRange(watermarkSelector.GetWatermarkOptions(channel, wm, Option<ChannelWatermark>.None));
} }
var mediaItem = new OtherVideo { MediaVersions = [v] };
PlayoutItemResult playoutItemResult = await service.ForPlayoutItem( PlayoutItemResult playoutItemResult = await service.ForPlayoutItem(
ExecutableName("ffmpeg"), ExecutableName("ffmpeg"),
ExecutableName("ffprobe"), ExecutableName("ffprobe"),
true, true,
channel, channel,
new MediaItemVideoVersion(null, v), new MediaItemVideoVersion(mediaItem, v),
new MediaItemAudioVersion(null, v), new MediaItemAudioVersion(mediaItem, v),
file, file,
file, file,
_ => subtitles.AsTask(), _ => subtitles.AsTask(),

Loading…
Cancel
Save