mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Preserve 3D format on metadata refresh (#14742)
This commit is contained in:
parent
6ac2d707cb
commit
e043f93a72
2 changed files with 12 additions and 2 deletions
|
|
@ -1279,7 +1279,7 @@ namespace MediaBrowser.Providers.Manager
|
||||||
{
|
{
|
||||||
if (source is Video sourceCast && target is Video targetCast)
|
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;
|
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, oldValue, newValue, null, true, out _));
|
||||||
Assert.True(TestMergeBaseItemData<Movie, MovieInfo>(propName, null, newValue, null, false, 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]
|
[Fact]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue