mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-25 15:33:11 +00:00
VideoCodec formatter HEVC.
This commit is contained in:
parent
b02d0a33b1
commit
e16e4091f1
3 changed files with 24 additions and 3 deletions
|
@ -84,7 +84,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||||
return "Vorbis";
|
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;
|
return audioFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||||
: "x264";
|
: "x264";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (videoCodec == "V_MPEGH/ISO/HEVC")
|
if (videoCodec == "V_MPEGH/ISO/HEVC" || videoCodec == "HEVC")
|
||||||
{
|
{
|
||||||
return sceneName.IsNotNullOrWhiteSpace() && Path.GetFileNameWithoutExtension(sceneName).Contains("h265")
|
return sceneName.IsNotNullOrWhiteSpace() && Path.GetFileNameWithoutExtension(sceneName).Contains("h265")
|
||||||
? "h265"
|
? "h265"
|
||||||
|
@ -131,7 +131,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
||||||
return "VC1";
|
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;
|
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\MediaInfoFormatter.cs" />
|
||||||
<Compile Include="MediaFiles\MediaInfo\MediaInfoLib.cs" />
|
<Compile Include="MediaFiles\MediaInfo\MediaInfoLib.cs" />
|
||||||
<Compile Include="MediaFiles\MediaInfo\MediaInfoModel.cs" />
|
<Compile Include="MediaFiles\MediaInfo\MediaInfoModel.cs" />
|
||||||
|
<Compile Include="MediaFiles\MediaInfo\UnknownCodecException.cs" />
|
||||||
<Compile Include="MediaFiles\MediaInfo\UpdateMediaInfoService.cs" />
|
<Compile Include="MediaFiles\MediaInfo\UpdateMediaInfoService.cs" />
|
||||||
<Compile Include="MediaFiles\MediaInfo\VideoFileInfoReader.cs" />
|
<Compile Include="MediaFiles\MediaInfo\VideoFileInfoReader.cs" />
|
||||||
<Compile Include="MediaFiles\RecycleBinProvider.cs" />
|
<Compile Include="MediaFiles\RecycleBinProvider.cs" />
|
||||||
|
|
Loading…
Reference in a new issue