consolidate ibn api a bit

This commit is contained in:
Luke Pulverenti
2014-02-22 15:20:22 -05:00
parent 014c06ea43
commit b52d99568b
8 changed files with 56 additions and 322 deletions

View File

@@ -183,7 +183,10 @@ namespace MediaBrowser.Providers.MediaInfo
audio.ProductionYear = FFProbeHelpers.GetDictionaryNumericValue(tags, "date");
// Several different forms of retaildate
audio.PremiereDate = FFProbeHelpers.GetDictionaryDateTime(tags, "retaildate") ?? FFProbeHelpers.GetDictionaryDateTime(tags, "retail date") ?? FFProbeHelpers.GetDictionaryDateTime(tags, "retail_date");
audio.PremiereDate = FFProbeHelpers.GetDictionaryDateTime(tags, "retaildate") ??
FFProbeHelpers.GetDictionaryDateTime(tags, "retail date") ??
FFProbeHelpers.GetDictionaryDateTime(tags, "retail_date") ??
FFProbeHelpers.GetDictionaryDateTime(tags, "date");
// If we don't have a ProductionYear try and get it from PremiereDate
if (audio.PremiereDate.HasValue && !audio.ProductionYear.HasValue)

View File

@@ -516,8 +516,6 @@ namespace MediaBrowser.Providers.MediaInfo
var path = mount == null ? item.Path : mount.MountedPath;
var dvd = new Dvd(path);
item.RunTimeTicks = dvd.Titles.Select(GetRuntime).Max();
var primaryTitle = dvd.Titles.OrderByDescending(GetRuntime).FirstOrDefault();
uint? titleNumber = null;
@@ -525,6 +523,7 @@ namespace MediaBrowser.Providers.MediaInfo
if (primaryTitle != null)
{
titleNumber = primaryTitle.TitleNumber;
item.RunTimeTicks = GetRuntime(primaryTitle);
}
item.PlayableStreamFileNames = GetPrimaryPlaylistVobFiles(item, mount, titleNumber)