Preserve 3D format on metadata refresh (#14742)

This commit is contained in:
theguymadmax 2025-09-06 13:38:00 -04:00 committed by GitHub
parent 6ac2d707cb
commit e043f93a72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -1279,7 +1279,7 @@ namespace MediaBrowser.Providers.Manager
{
if (source is Video sourceCast && target is Video targetCast)
{
if (replaceData || !targetCast.Video3DFormat.HasValue)
if (sourceCast.Video3DFormat.HasValue && (replaceData || !targetCast.Video3DFormat.HasValue))
{
targetCast.Video3DFormat = sourceCast.Video3DFormat;
}

View File

@ -157,7 +157,17 @@ namespace Jellyfin.Providers.Tests.Manager
Assert.True(TestMergeBaseItemData<Movie, MovieInfo>(propName, oldValue, newValue, null, true, out _));
Assert.True(TestMergeBaseItemData<Movie, MovieInfo>(propName, null, newValue, null, false, out _));
Assert.True(TestMergeBaseItemData<Movie, MovieInfo>(propName, oldValue, null, null, true, out _));
// Video3DFormat - null values do NOT replace existing data
if (string.Equals(propName, "Video3DFormat", StringComparison.Ordinal))
{
Assert.False(
TestMergeBaseItemData<Movie, MovieInfo>(propName, oldValue, null, null, true, out _));
}
else
{
Assert.True(
TestMergeBaseItemData<Movie, MovieInfo>(propName, oldValue, null, null, true, out _));
}
}
[Fact]