aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Dlna/DirectPlayProfile.cs')
-rw-r--r--MediaBrowser.Model/Dlna/DirectPlayProfile.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
index 0b6ecf385..df511b0da 100644
--- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
+++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
@@ -1,6 +1,7 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
+using System.Linq;
using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
namespace MediaBrowser.Model.Dlna
{
@@ -28,6 +29,19 @@ namespace MediaBrowser.Model.Dlna
return list;
}
+ public bool SupportsContainer(string container)
+ {
+ var all = GetContainers();
+
+ // Only allow unknown container if the profile is all inclusive
+ if (string.IsNullOrWhiteSpace(container))
+ {
+ return all.Count == 0;
+ }
+
+ return all.Count == 0 || all.Contains(container, StringComparer.OrdinalIgnoreCase);
+ }
+
public List<string> GetAudioCodecs()
{
List<string> list = new List<string>();