diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Model/Dlna/CodecProfile.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Model/Dlna/CodecProfile.cs')
| -rw-r--r-- | MediaBrowser.Model/Dlna/CodecProfile.cs | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs deleted file mode 100644 index 6d143962d..000000000 --- a/MediaBrowser.Model/Dlna/CodecProfile.cs +++ /dev/null @@ -1,68 +0,0 @@ -using MediaBrowser.Model.Extensions; -using System.Collections.Generic; -using System.Xml.Serialization; -using MediaBrowser.Model.Dlna; - -namespace MediaBrowser.Model.Dlna -{ - public class CodecProfile - { - [XmlAttribute("type")] - public CodecType Type { get; set; } - - public ProfileCondition[] Conditions { get; set; } - - public ProfileCondition[] ApplyConditions { get; set; } - - [XmlAttribute("codec")] - public string Codec { get; set; } - - [XmlAttribute("container")] - public string Container { get; set; } - - public CodecProfile() - { - Conditions = new ProfileCondition[] {}; - ApplyConditions = new ProfileCondition[] { }; - } - - public string[] GetCodecs() - { - return ContainerProfile.SplitValue(Codec); - } - - private bool ContainsContainer(string container) - { - return ContainerProfile.ContainsContainer(Container, container); - } - - public bool ContainsAnyCodec(string codec, string container) - { - return ContainsAnyCodec(ContainerProfile.SplitValue(codec), container); - } - - public bool ContainsAnyCodec(string[] codec, string container) - { - if (!ContainsContainer(container)) - { - return false; - } - - var codecs = GetCodecs(); - if (codecs.Length == 0) - { - return true; - } - - foreach (var val in codec) - { - if (ListHelper.ContainsIgnoreCase(codecs, val)) - { - return true; - } - } - - return false; - } - } -} |
