aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2026-11-06 09:36:52 +0100
committerGitHub <noreply@github.com>2026-11-06 09:36:52 +0100
commitdeb2c9c59297003e9fa3372c9fdecee4f1beb1bf (patch)
treeb5d86856b3a90806de75df305d6d4a1f19fae247 /tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
parentde93ba4f545c278fbc81ec9c69e9d4f7814b01bc (diff)
parenta92a574be09dc415198ed7e5775ffd9ef2b44a58 (diff)
Merge pull request #17642 from mysticalsoap/fix-premiere-date-from-container-encode-date
Keep container creation time out of the premiere date chain
Diffstat (limited to 'tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs')
-rw-r--r--tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs b/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
index cf9930abe1..e68abf6947 100644
--- a/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
+++ b/tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs
@@ -291,6 +291,19 @@ namespace Jellyfin.MediaEncoding.Tests.Probing
}
[Fact]
+ public void GetMediaInfo_ContainerCreationTime_KeptOutOfPremiereDate()
+ {
+ var bytes = File.ReadAllBytes("Test Data/Probing/video_progressive_no_field_order.json");
+
+ var internalMediaInfoResult = JsonSerializer.Deserialize<InternalMediaInfoResult>(bytes, _jsonOptions);
+ MediaInfo res = _probeResultNormalizer.GetMediaInfo(internalMediaInfoResult, VideoType.VideoFile, false, "Test Data/Probing/video_progressive_no_field_order.mp4", MediaProtocol.File);
+
+ Assert.Equal(new DateTime(2020, 1, 20, 13, 56, 34, DateTimeKind.Utc), res.ContainerCreationDate);
+ Assert.Null(res.PremiereDate);
+ Assert.Null(res.ProductionYear);
+ }
+
+ [Fact]
public void GetMediaInfo_ProgressiveVideoNoFieldOrder_Success()
{
var bytes = File.ReadAllBytes("Test Data/Probing/video_progressive_no_field_order.json");