mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
VideoCodec formatter HEVC.
This commit is contained in:
@@ -84,7 +84,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||
return "Vorbis";
|
||||
}
|
||||
|
||||
Logger.Error(new Exception(), "Unknown audio format: {0} in {1}. Please notify Sonarr developers.", audioFormat, sceneName);
|
||||
Logger.Error(new UnknownCodecException(audioFormat, sceneName), "Unknown audio format: {0} in '{1}'. Please notify Sonarr developers.", audioFormat, sceneName);
|
||||
return audioFormat;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||
: "x264";
|
||||
}
|
||||
|
||||
if (videoCodec == "V_MPEGH/ISO/HEVC")
|
||||
if (videoCodec == "V_MPEGH/ISO/HEVC" || videoCodec == "HEVC")
|
||||
{
|
||||
return sceneName.IsNotNullOrWhiteSpace() && Path.GetFileNameWithoutExtension(sceneName).Contains("h265")
|
||||
? "h265"
|
||||
@@ -131,7 +131,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||
return "VC1";
|
||||
}
|
||||
|
||||
Logger.Error(new Exception(), "Unknown video codec: {0} in {1}. Please notify Sonarr developers.", videoCodec, sceneName);
|
||||
Logger.Error(new UnknownCodecException(videoCodec, sceneName), "Unknown video codec: {0} in '{1}'. Please notify Sonarr developers.", videoCodec, sceneName);
|
||||
return videoCodec;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||
{
|
||||
public class UnknownCodecException : Exception
|
||||
{
|
||||
public string Codec { get; set; }
|
||||
public string SceneName { get; set; }
|
||||
|
||||
public UnknownCodecException(string codec, string sceneName)
|
||||
: base($"Unknown codec {codec}")
|
||||
{
|
||||
Codec = codec;
|
||||
SceneName = sceneName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -807,6 +807,7 @@
|
||||
<Compile Include="MediaFiles\MediaInfo\MediaInfoFormatter.cs" />
|
||||
<Compile Include="MediaFiles\MediaInfo\MediaInfoLib.cs" />
|
||||
<Compile Include="MediaFiles\MediaInfo\MediaInfoModel.cs" />
|
||||
<Compile Include="MediaFiles\MediaInfo\UnknownCodecException.cs" />
|
||||
<Compile Include="MediaFiles\MediaInfo\UpdateMediaInfoService.cs" />
|
||||
<Compile Include="MediaFiles\MediaInfo\VideoFileInfoReader.cs" />
|
||||
<Compile Include="MediaFiles\RecycleBinProvider.cs" />
|
||||
|
||||
Reference in New Issue
Block a user