mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-09-29 15:31:04 -04:00
Preserve 3D format on metadata refresh (#14742)
This commit is contained in:
parent
6ac2d707cb
commit
e043f93a72
@ -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;
|
||||
}
|
||||
|
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user