diff options
| author | ExpctING <wang812584596@gmail.com> | 2026-05-03 02:06:13 +0800 |
|---|---|---|
| committer | ExpctING <wang812584596@gmail.com> | 2026-05-03 02:06:13 +0800 |
| commit | 127d924c5bd004cb61bebc47a6474453408dcd5e (patch) | |
| tree | 36f450c88ea2cff4f45b356f0241f066e1c37b31 /tests | |
| parent | 1dd8541ed5832414c326f0c2662a899e1ec96259 (diff) | |
fix
Co-authored-by: Copilot <copilot@github.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs b/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs index 7cb3e61724..a7491f42e9 100644 --- a/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs +++ b/tests/Jellyfin.Providers.Tests/MediaInfo/FFProbeVideoInfoTests.cs @@ -59,4 +59,20 @@ public class FFProbeVideoInfoTests Assert.Equal(chaptersCount, chapters.Length); } + + [Theory] + [InlineData(1L)] + [InlineData(TimeSpan.TicksPerMinute * 3)] + [InlineData(TimeSpan.TicksPerMinute * 5)] + [InlineData((TimeSpan.TicksPerMinute * 5) + 1)] + [InlineData((TimeSpan.TicksPerMinute * 50) + 1)] + public void CreateDummyChapters_PositiveRuntime_NoChapterBeyondRuntime(long runtime) + { + var chapters = _fFProbeVideoInfo.CreateDummyChapters(new Video() + { + RunTimeTicks = runtime + }); + + Assert.All(chapters, chapter => Assert.True(chapter.StartPositionTicks < runtime)); + } } |
