mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
This commit is contained in:
parent
1fa736c6d8
commit
7c251157ed
1 changed files with 8 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using Newtonsoft.Json;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
@ -48,11 +49,14 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|||
return AudioChannelPositionsText.ContainsIgnoreCase("LFE") ? AudioChannels - 1 + 0.1m : AudioChannels;
|
||||
}
|
||||
|
||||
decimal channels = 0;
|
||||
return
|
||||
AudioChannelPositions.Replace(" / ", "$")
|
||||
.Split('$')
|
||||
.First()
|
||||
.Split('/')
|
||||
.Sum(s => decimal.Parse(s, CultureInfo.InvariantCulture));
|
||||
|
||||
decimal.TryParse(AudioChannelPositions.Split('/').First(), out channels);
|
||||
|
||||
return channels;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue