From be2e1e4fdb08ead3424ee24b191c988241a8b7b6 Mon Sep 17 00:00:00 2001 From: yammes08 <111231042+yammes08@users.noreply.github.com> Date: Sat, 1 Jun 2024 01:09:53 +0100 Subject: [PATCH] Fixed: SDR files being parsed as HLG (cherry picked from commit 11e5c5a11b171138c235224c1aa9a258f0a4ec4d) --- .../MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs | 2 +- src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs | 4 ++-- src/NzbDrone.Core/Organizer/FileNameBuilder.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs index c48f3a63d..49a3b06d9 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MediaInfo/VideoFileInfoReaderFixture.cs @@ -107,7 +107,7 @@ public void get_info_unicode() [TestCase(10, "", "", "", null, HdrFormat.None)] [TestCase(10, "bt709", "bt709", "", null, HdrFormat.None)] [TestCase(8, "bt2020", "smpte2084", "", null, HdrFormat.None)] - [TestCase(10, "bt2020", "bt2020-10", "", null, HdrFormat.Hlg10)] + [TestCase(10, "bt2020", "bt2020-10", "", null, HdrFormat.None)] [TestCase(10, "bt2020", "arib-std-b67", "", null, HdrFormat.Hlg10)] [TestCase(10, "bt2020", "smpte2084", "", null, HdrFormat.Pq10)] [TestCase(10, "bt2020", "smpte2084", "FFMpegCore.SideData", null, HdrFormat.Pq10)] diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs index e2e8190f6..868d7749a 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs @@ -22,10 +22,10 @@ public class VideoFileInfoReader : IVideoFileInfoReader private readonly List _pixelFormats; public const int MINIMUM_MEDIA_INFO_SCHEMA_REVISION = 8; - public const int CURRENT_MEDIA_INFO_SCHEMA_REVISION = 12; + public const int CURRENT_MEDIA_INFO_SCHEMA_REVISION = 13; private static readonly string[] ValidHdrColourPrimaries = { "bt2020" }; - private static readonly string[] HlgTransferFunctions = { "bt2020-10", "arib-std-b67" }; + private static readonly string[] HlgTransferFunctions = { "arib-std-b67" }; private static readonly string[] PqTransferFunctions = { "smpte2084" }; private static readonly string[] ValidHdrTransferFunctions = HlgTransferFunctions.Concat(PqTransferFunctions).ToArray(); diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index 780413b38..53ae1a948 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -355,7 +355,7 @@ private void AddQualityTokens(Dictionary> token new Dictionary(FileNameBuilderTokenEqualityComparer.Instance) { { MediaInfoVideoDynamicRangeToken, 5 }, - { MediaInfoVideoDynamicRangeTypeToken, 12 } + { MediaInfoVideoDynamicRangeTypeToken, 13 } }; private void AddMediaInfoTokens(Dictionary> tokenHandlers, MovieFile movieFile)