|
|
|
@ -88,6 +88,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|
|
|
|
int generalRuntime;
|
|
|
|
|
int streamCount;
|
|
|
|
|
int audioChannels;
|
|
|
|
|
int videoBitDepth;
|
|
|
|
|
decimal videoFrameRate;
|
|
|
|
|
|
|
|
|
|
string subtitles = mediaInfo.Get(StreamKind.General, 0, "Text_Language_List");
|
|
|
|
@ -96,6 +97,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|
|
|
|
int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "Height"), out height);
|
|
|
|
|
int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "BitRate"), out videoBitRate);
|
|
|
|
|
decimal.TryParse(mediaInfo.Get(StreamKind.Video, 0, "FrameRate"), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out videoFrameRate);
|
|
|
|
|
int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "BitDepth"), out videoBitDepth);
|
|
|
|
|
|
|
|
|
|
//Runtime
|
|
|
|
|
int.TryParse(mediaInfo.Get(StreamKind.Video, 0, "PlayTime"), out videoRuntime);
|
|
|
|
@ -105,7 +107,9 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|
|
|
|
string aBitRate = mediaInfo.Get(StreamKind.Audio, 0, "BitRate");
|
|
|
|
|
int aBindex = aBitRate.IndexOf(" /", StringComparison.InvariantCultureIgnoreCase);
|
|
|
|
|
if (aBindex > 0)
|
|
|
|
|
{
|
|
|
|
|
aBitRate = aBitRate.Remove(aBindex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int.TryParse(aBitRate, out audioBitRate);
|
|
|
|
|
int.TryParse(mediaInfo.Get(StreamKind.Audio, 0, "StreamCount"), out streamCount);
|
|
|
|
@ -113,21 +117,30 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|
|
|
|
|
|
|
|
|
string audioChannelsStr = mediaInfo.Get(StreamKind.Audio, 0, "Channel(s)");
|
|
|
|
|
int aCindex = audioChannelsStr.IndexOf(" /", StringComparison.InvariantCultureIgnoreCase);
|
|
|
|
|
|
|
|
|
|
if (aCindex > 0)
|
|
|
|
|
{
|
|
|
|
|
audioChannelsStr = audioChannelsStr.Remove(aCindex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var audioChannelPositions = mediaInfo.Get(StreamKind.Audio, 0, "ChannelPositions/String2");
|
|
|
|
|
|
|
|
|
|
string audioLanguages = mediaInfo.Get(StreamKind.General, 0, "Audio_Language_List");
|
|
|
|
|
string audioProfile = mediaInfo.Get(StreamKind.Audio, 0, "Format_Profile");
|
|
|
|
|
|
|
|
|
|
int aPindex = audioProfile.IndexOf(" /", StringComparison.InvariantCultureIgnoreCase);
|
|
|
|
|
|
|
|
|
|
if (aPindex > 0)
|
|
|
|
|
{
|
|
|
|
|
audioProfile = audioProfile.Remove(aPindex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int.TryParse(audioChannelsStr, out audioChannels);
|
|
|
|
|
var mediaInfoModel = new MediaInfoModel
|
|
|
|
|
{
|
|
|
|
|
VideoCodec = mediaInfo.Get(StreamKind.Video, 0, "Codec/String"),
|
|
|
|
|
VideoBitrate = videoBitRate,
|
|
|
|
|
VideoBitDepth = videoBitDepth,
|
|
|
|
|
Height = height,
|
|
|
|
|
Width = width,
|
|
|
|
|
AudioFormat = mediaInfo.Get(StreamKind.Audio, 0, "Format"),
|
|
|
|
@ -135,6 +148,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|
|
|
|
RunTime = GetBestRuntime(audioRuntime, videoRuntime, generalRuntime),
|
|
|
|
|
AudioStreamCount = streamCount,
|
|
|
|
|
AudioChannels = audioChannels,
|
|
|
|
|
AudioChannelPositions = audioChannelPositions,
|
|
|
|
|
AudioProfile = audioProfile.Trim(),
|
|
|
|
|
VideoFps = videoFrameRate,
|
|
|
|
|
AudioLanguages = audioLanguages,
|
|
|
|
|