update dialogs

pull/702/head
Luke Pulverenti 8 years ago
parent c6ca821d25
commit 34d4e4317a

@ -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.Entities
if (!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"))
{

@ -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();
}
}
}
}

@ -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" />

@ -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();
}
}
}
}
Loading…
Cancel
Save