ffprobe audio fixes

pull/702/head
Luke Pulverenti 11 years ago
parent 6d099c63d8
commit a254df9760

@ -141,10 +141,10 @@ namespace MediaBrowser.Providers.MediaInfo
audio.AlbumArtist = GetDictionaryValue(tags, "albumartist") ?? GetDictionaryValue(tags, "album artist") ?? GetDictionaryValue(tags, "album_artist"); audio.AlbumArtist = GetDictionaryValue(tags, "albumartist") ?? GetDictionaryValue(tags, "album artist") ?? GetDictionaryValue(tags, "album_artist");
// Track number // Track number
audio.IndexNumber = GetDictionaryNumericValue(tags, "track"); audio.IndexNumber = GetDictionaryDiscValue(tags, "track");
// Disc number // Disc number
audio.ParentIndexNumber = GetDictionaryDiscValue(tags); audio.ParentIndexNumber = GetDictionaryDiscValue(tags, "disc");
audio.Language = GetDictionaryValue(tags, "language"); audio.Language = GetDictionaryValue(tags, "language");
@ -240,10 +240,11 @@ namespace MediaBrowser.Providers.MediaInfo
/// Gets the disc number, which is sometimes can be in the form of '1', or '1/3' /// Gets the disc number, which is sometimes can be in the form of '1', or '1/3'
/// </summary> /// </summary>
/// <param name="tags">The tags.</param> /// <param name="tags">The tags.</param>
/// <param name="tagName">Name of the tag.</param>
/// <returns>System.Nullable{System.Int32}.</returns> /// <returns>System.Nullable{System.Int32}.</returns>
private int? GetDictionaryDiscValue(Dictionary<string, string> tags) private int? GetDictionaryDiscValue(Dictionary<string, string> tags, string tagName)
{ {
var disc = GetDictionaryValue(tags, "disc"); var disc = GetDictionaryValue(tags, tagName);
if (!string.IsNullOrEmpty(disc)) if (!string.IsNullOrEmpty(disc))
{ {

Loading…
Cancel
Save