The Free Software Media System - Server Backend & API
update dialogs
Luke Pulverenti34d4e4317aa9
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.csindex d0d4669062..64c7d9aa6c 100644--- a/MediaBrowser.Model/Entities/MediaStream.cs+++ b/MediaBrowser.Model/Entities/MediaStream.cs@@ -1,8 +1,8 @@-using System;-using System.Collections.Generic;+using System.Collections.Generic;using MediaBrowser.Model.Dlna;using MediaBrowser.Model.Extensions;using System.Diagnostics;+using MediaBrowser.Model.MediaInfo;namespace MediaBrowser.Model.Entities{@@ -53,11 +53,11 @@ namespace MediaBrowser.Model.Entitiesif (!string.IsNullOrEmpty(Language)){- attributes.Add(Language.FirstToUpper());+ attributes.Add(StringHelper.FirstToUpper(Language));}if (!string.IsNullOrEmpty(Codec) && !StringHelper.EqualsIgnoreCase(Codec, "dca")){- attributes.Add(CodecHelper.FriendlyName(Codec));+ attributes.Add(AudioCodec.GetFriendlyName(Codec));}else if (!string.IsNullOrEmpty(Profile) && !StringHelper.EqualsIgnoreCase(Profile, "lc")){diff --git a/MediaBrowser.Model/Extensions/CodecHelper.cs b/MediaBrowser.Model/Extensions/CodecHelper.csdeleted file mode 100644index 8d037008ef..0000000000--- a/MediaBrowser.Model/Extensions/CodecHelper.cs+++ /dev/null@@ -1,28 +0,0 @@-using System;-using System.Collections.Generic;-using System.Linq;-using System.Text;-using System.Threading.Tasks;--namespace MediaBrowser.Model.Extensions-{- public static class CodecHelper- {- public static string FriendlyName(string codec)- {- if (string.IsNullOrEmpty(codec)) return "";-- switch (codec.ToLower())- {- case "ac3":- return "Dolby Digital";- case "eac3":- return "Dolby Digital+";- case "dca":- return "DTS";- default:- return codec.ToUpper();- }- }- }-}diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csprojindex dc78bcf8eb..7c469b9fb9 100644--- a/MediaBrowser.Model/MediaBrowser.Model.csproj+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj@@ -137,7 +137,6 @@<Compile Include="Dto\MetadataEditorInfo.cs" /><Compile Include="Dto\NameIdPair.cs" /><Compile Include="Dto\NameValuePair.cs" />- <Compile Include="Extensions\CodecHelper.cs" /><Compile Include="FileOrganization\SmartMatchInfo.cs" /><Compile Include="MediaInfo\LiveStreamRequest.cs" /><Compile Include="MediaInfo\LiveStreamResponse.cs" />diff --git a/MediaBrowser.Model/MediaInfo/AudioCodec.cs b/MediaBrowser.Model/MediaInfo/AudioCodec.csindex 5353f2b3ec..93aba2f434 100644--- a/MediaBrowser.Model/MediaInfo/AudioCodec.cs+++ b/MediaBrowser.Model/MediaInfo/AudioCodec.cs@@ -5,5 +5,22 @@public const string AAC = "aac";public const string MP3 = "mp3";public const string AC3 = "ac3";++ public static string GetFriendlyName(string codec)+ {+ if (string.IsNullOrEmpty(codec)) return "";++ switch (codec.ToLower())+ {+ case "ac3":+ return "Dolby Digital";+ case "eac3":+ return "Dolby Digital+";+ case "dca":+ return "DTS";+ default:+ return codec.ToUpper();+ }+ }}}\ No newline at end of file