1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 07:22:35 +01:00

New: Improve video stream formatting

This commit is contained in:
Qstick 2023-04-13 20:30:32 -05:00
parent b0834015e7
commit 39350ed0de
2 changed files with 12 additions and 5 deletions

View File

@ -25,6 +25,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo.MediaInfoFormatterTests
[TestCase("msmpeg4, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")]
[TestCase("msmpeg4v2, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")]
[TestCase("msmpeg4v3, DIV3", "Exit the Dragon, Enter the Tiger (1976) 360p MPEG Audio.avi", "DivX")]
[TestCase("vp6f, 4", "Top Gear - S12E01 - Lorries - SD TV.flv", "VP6")]
[TestCase("vp6, 4", "Top Gear - S12E01 - Lorries - SD TV.flv", "VP6")]
[TestCase("vp7, VP70", "Sweet Seymour.avi", "VP7")]
[TestCase("vp8, V_VP8", "Dick.mkv", "VP8")]

View File

@ -154,7 +154,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
}
Logger.Debug()
.Message("Unknown audio format: '{0}' in '{1}'.", mediaInfo.RawStreamData, sceneName)
.Message("Unknown audio format: '{0}' in '{1}'. Streams: {2}", audioFormat, sceneName, mediaInfo.RawStreamData)
.WriteSentryWarn("UnknownAudioFormatFFProbe", mediaInfo.ContainerFormat, mediaInfo.AudioFormat, audioCodecID)
.Write();
@ -236,8 +236,12 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
return "AV1";
}
if (videoFormat == "vp6" ||
videoFormat == "vp7" ||
if (videoFormat.Contains("vp6"))
{
return "VP6";
}
if (videoFormat == "vp7" ||
videoFormat == "vp8" ||
videoFormat == "vp9")
{
@ -257,13 +261,15 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
videoFormat == "rv20" ||
videoFormat == "rv30" ||
videoFormat == "rv40" ||
videoFormat == "cinepak")
videoFormat == "cinepak" ||
videoFormat == "rawvideo" ||
videoFormat == "msvideo1")
{
return "";
}
Logger.Debug()
.Message("Unknown video format: '{0}' in '{1}'.", mediaInfo.RawStreamData, sceneName)
.Message("Unknown video format: '{0}' in '{1}'. Streams: {2}", videoFormat, sceneName, mediaInfo.RawStreamData)
.WriteSentryWarn("UnknownVideoFormatFFProbe", mediaInfo.ContainerFormat, videoFormat, videoCodecID)
.Write();