Răsfoiți Sursa

update dlna profiles

Luke Pulverenti 8 ani în urmă
părinte
comite
c7d520555b
83 a modificat fișierele cu 1169 adăugiri și 846 ștergeri
  1. 16 34
      Emby.Dlna/DlnaManager.cs
  2. 32 42
      Emby.Dlna/Emby.Dlna.csproj
  3. 0 68
      Emby.Dlna/ProfileSerialization/CodecProfile.cs
  4. 0 31
      Emby.Dlna/ProfileSerialization/ContainerProfile.cs
  5. 0 351
      Emby.Dlna/ProfileSerialization/DeviceProfile.cs
  6. 0 51
      Emby.Dlna/ProfileSerialization/DirectPlayProfile.cs
  7. 0 17
      Emby.Dlna/ProfileSerialization/HttpHeaderInfo.cs
  8. 0 39
      Emby.Dlna/ProfileSerialization/ProfileCondition.cs
  9. 0 64
      Emby.Dlna/ProfileSerialization/ResponseProfile.cs
  10. 0 48
      Emby.Dlna/ProfileSerialization/SubtitleProfile.cs
  11. 0 58
      Emby.Dlna/ProfileSerialization/TranscodingProfile.cs
  12. 0 13
      Emby.Dlna/ProfileSerialization/XmlAttribute.cs
  13. 0 0
      Emby.Dlna/Profiles/Json/BubbleUPnp.json
  14. 0 0
      Emby.Dlna/Profiles/Json/Default.json
  15. 0 0
      Emby.Dlna/Profiles/Json/Denon AVR.json
  16. 0 0
      Emby.Dlna/Profiles/Json/DirecTV HD-DVR.json
  17. 0 0
      Emby.Dlna/Profiles/Json/Dish Hopper-Joey.json
  18. 0 0
      Emby.Dlna/Profiles/Json/Kodi.json
  19. 0 0
      Emby.Dlna/Profiles/Json/LG Smart TV.json
  20. 0 0
      Emby.Dlna/Profiles/Json/Linksys DMA2100.json
  21. 0 0
      Emby.Dlna/Profiles/Json/MediaMonkey.json
  22. 0 0
      Emby.Dlna/Profiles/Json/Panasonic Viera.json
  23. 0 0
      Emby.Dlna/Profiles/Json/Popcorn Hour.json
  24. 0 0
      Emby.Dlna/Profiles/Json/Samsung Smart TV.json
  25. 0 0
      Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2013.json
  26. 0 0
      Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2014.json
  27. 0 0
      Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2015.json
  28. 0 0
      Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2016.json
  29. 0 0
      Emby.Dlna/Profiles/Json/Sony Blu-ray Player.json
  30. 0 0
      Emby.Dlna/Profiles/Json/Sony Bravia (2010).json
  31. 0 0
      Emby.Dlna/Profiles/Json/Sony Bravia (2011).json
  32. 0 0
      Emby.Dlna/Profiles/Json/Sony Bravia (2012).json
  33. 0 0
      Emby.Dlna/Profiles/Json/Sony Bravia (2013).json
  34. 0 0
      Emby.Dlna/Profiles/Json/Sony Bravia (2014).json
  35. 0 0
      Emby.Dlna/Profiles/Json/Sony PlayStation 3.json
  36. 0 0
      Emby.Dlna/Profiles/Json/Sony PlayStation 4.json
  37. 0 0
      Emby.Dlna/Profiles/Json/Vlc.json
  38. 0 0
      Emby.Dlna/Profiles/Json/WDTV Live.json
  39. 0 0
      Emby.Dlna/Profiles/Json/Xbox 360.json
  40. 0 0
      Emby.Dlna/Profiles/Json/Xbox One.json
  41. 0 0
      Emby.Dlna/Profiles/Json/foobar2000.json
  42. 29 0
      Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
  43. 23 0
      Emby.Dlna/Profiles/Xml/Default.xml
  44. 28 0
      Emby.Dlna/Profiles/Xml/Denon AVR.xml
  45. 29 0
      Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
  46. 92 0
      Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
  47. 29 0
      Emby.Dlna/Profiles/Xml/Kodi.xml
  48. 29 0
      Emby.Dlna/Profiles/Xml/LG Smart TV.xml
  49. 27 0
      Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
  50. 29 0
      Emby.Dlna/Profiles/Xml/MediaMonkey.xml
  51. 30 0
      Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
  52. 23 0
      Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
  53. 29 0
      Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
  54. 33 0
      Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
  55. 33 0
      Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
  56. 31 0
      Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
  57. 31 0
      Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
  58. 31 0
      Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
  59. 133 0
      Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
  60. 31 0
      Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
  61. 31 0
      Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
  62. 31 0
      Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
  63. 31 0
      Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
  64. 31 0
      Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
  65. 31 0
      Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
  66. 29 0
      Emby.Dlna/Profiles/Xml/Vlc.xml
  67. 30 0
      Emby.Dlna/Profiles/Xml/WDTV Live.xml
  68. 31 0
      Emby.Dlna/Profiles/Xml/Xbox 360.xml
  69. 30 0
      Emby.Dlna/Profiles/Xml/Xbox One.xml
  70. 29 0
      Emby.Dlna/Profiles/Xml/foobar2000.xml
  71. 0 1
      Emby.Server.Core/ApplicationHost.cs
  72. 12 1
      MediaBrowser.Controller/Entities/Movies/Movie.cs
  73. 4 0
      MediaBrowser.Model/Dlna/CodecProfile.cs
  74. 3 0
      MediaBrowser.Model/Dlna/ContainerProfile.cs
  75. 35 22
      MediaBrowser.Model/Dlna/DeviceProfile.cs
  76. 6 0
      MediaBrowser.Model/Dlna/DirectPlayProfile.cs
  77. 4 0
      MediaBrowser.Model/Dlna/HttpHeaderInfo.cs
  78. 5 0
      MediaBrowser.Model/Dlna/ProfileCondition.cs
  79. 7 0
      MediaBrowser.Model/Dlna/ResponseProfile.cs
  80. 5 0
      MediaBrowser.Model/Dlna/SubtitleProfile.cs
  81. 14 0
      MediaBrowser.Model/Dlna/TranscodingProfile.cs
  82. 2 0
      MediaBrowser.Model/Dlna/XmlAttribute.cs
  83. 0 6
      MediaBrowser.Model/System/SystemInfo.cs

+ 16 - 34
Emby.Dlna/DlnaManager.cs

@@ -289,23 +289,13 @@ namespace Emby.Dlna
                 var allFiles = _fileSystem.GetFiles(path)
                     .ToList();
 
-                var xmlFies = type == DeviceProfileType.System ? 
-                    new List<FileSystemMetadata>() : 
-                    allFiles
+                var xmlFies = allFiles
                     .Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
                     .ToList();
 
-                var jsonFiles = allFiles
-                    .Where(i => string.Equals(i.Extension, ".json", StringComparison.OrdinalIgnoreCase))
-                    .ToList();
-
-                var jsonFileNames = jsonFiles
-                    .Select(i => Path.GetFileNameWithoutExtension(i.Name))
-                    .ToList();
-
-                var parseFiles = jsonFiles.ToList();
+                var parseFiles = new List<FileSystemMetadata>();
 
-                parseFiles.AddRange(xmlFies.Where(i => !jsonFileNames.Contains(Path.GetFileNameWithoutExtension(i.Name), StringComparer.Ordinal)));
+                parseFiles.AddRange(xmlFies);
 
                 return parseFiles
                     .Select(i => ParseProfileFile(i.FullName, type))
@@ -334,10 +324,9 @@ namespace Emby.Dlna
 
                     if (string.Equals(Path.GetExtension(path), ".xml", StringComparison.OrdinalIgnoreCase))
                     {
-                        var tempProfile = (ProfileSerialization.DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(Emby.Dlna.ProfileSerialization.DeviceProfile), path);
+                        var tempProfile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path);
 
-                        var json = _jsonSerializer.SerializeToString(tempProfile);
-                        profile = (DeviceProfile)_jsonSerializer.DeserializeFromString<DeviceProfile>(json);
+                        profile = ReserializeProfile(tempProfile);
                     }
                     else
                     {
@@ -406,7 +395,7 @@ namespace Emby.Dlna
 
         private void ExtractSystemProfiles()
         {
-            var namespaceName = GetType().Namespace + ".Profiles.Json.";
+            var namespaceName = GetType().Namespace + ".Profiles.Xml.";
 
             var systemProfilesPath = SystemProfilesPath;
 
@@ -464,7 +453,7 @@ namespace Emby.Dlna
                 throw new ArgumentException("Profile is missing Name");
             }
 
-            var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".json";
+            var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml";
             var path = Path.Combine(UserProfilesPath, newFilename);
 
             SaveProfile(profile, path, DeviceProfileType.User);
@@ -485,7 +474,7 @@ namespace Emby.Dlna
 
             var current = GetProfileInfosInternal().First(i => string.Equals(i.Info.Id, profile.Id, StringComparison.OrdinalIgnoreCase));
 
-            var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".json";
+            var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml";
             var path = Path.Combine(UserProfilesPath, newFilename);
 
             if (!string.Equals(path, current.Path, StringComparison.Ordinal) &&
@@ -503,21 +492,12 @@ namespace Emby.Dlna
             {
                 _profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
             }
-            SerializeToJson(profile, path);
+            SerializeToXml(profile, path);
         }
 
-        internal void SerializeToJson(DeviceProfile profile, string path)
+        internal void SerializeToXml(DeviceProfile profile, string path)
         {
-            _jsonSerializer.SerializeToFile(profile, path);
-
-            try
-            {
-                _fileSystem.DeleteFile(Path.ChangeExtension(path, ".xml"));
-            }
-            catch
-            {
-
-            }
+            _xmlSerializer.SerializeToFile(profile, path);
         }
 
         /// <summary>
@@ -575,12 +555,14 @@ namespace Emby.Dlna
         private readonly IApplicationPaths _appPaths;
         private readonly IJsonSerializer _jsonSerializer;
         private readonly IFileSystem _fileSystem;
+        private readonly IXmlSerializer _xmlSerializer;
 
-        public DlnaProfileEntryPoint(IApplicationPaths appPaths, IFileSystem fileSystem, IJsonSerializer jsonSerializer)
+        public DlnaProfileEntryPoint(IApplicationPaths appPaths, IFileSystem fileSystem, IJsonSerializer jsonSerializer, IXmlSerializer xmlSerializer)
         {
             _appPaths = appPaths;
             _fileSystem = fileSystem;
             _jsonSerializer = jsonSerializer;
+            _xmlSerializer = xmlSerializer;
         }
 
         public void Run()
@@ -628,9 +610,9 @@ namespace Emby.Dlna
 
             foreach (var item in list)
             {
-                var path = Path.Combine(_appPaths.ProgramDataPath, _fileSystem.GetValidFilename(item.Name) + ".json");
+                var path = Path.Combine(_appPaths.ProgramDataPath, _fileSystem.GetValidFilename(item.Name) + ".xml");
 
-                _jsonSerializer.SerializeToFile(item, path);
+                _xmlSerializer.SerializeToFile(item, path);
             }
         }
 

+ 32 - 42
Emby.Dlna/Emby.Dlna.csproj

@@ -33,38 +33,6 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
-  <ItemGroup>
-    <!-- A reference to the entire .NET Framework is automatically included -->
-    <EmbeddedResource Include="Profiles\Json\BubbleUPnp.json" />
-    <EmbeddedResource Include="Profiles\Json\Default.json" />
-    <EmbeddedResource Include="Profiles\Json\Denon AVR.json" />
-    <EmbeddedResource Include="Profiles\Json\DirecTV HD-DVR.json" />
-    <EmbeddedResource Include="Profiles\Json\Dish Hopper-Joey.json" />
-    <EmbeddedResource Include="Profiles\Json\foobar2000.json" />
-    <EmbeddedResource Include="Profiles\Json\Kodi.json" />
-    <EmbeddedResource Include="Profiles\Json\LG Smart TV.json" />
-    <EmbeddedResource Include="Profiles\Json\Linksys DMA2100.json" />
-    <EmbeddedResource Include="Profiles\Json\MediaMonkey.json" />
-    <EmbeddedResource Include="Profiles\Json\Panasonic Viera.json" />
-    <EmbeddedResource Include="Profiles\Json\Popcorn Hour.json" />
-    <EmbeddedResource Include="Profiles\Json\Samsung Smart TV.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Blu-ray Player 2013.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Blu-ray Player 2014.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Blu-ray Player 2015.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Blu-ray Player 2016.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Blu-ray Player.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Bravia %282010%29.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Bravia %282011%29.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Bravia %282012%29.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Bravia %282013%29.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony Bravia %282014%29.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony PlayStation 3.json" />
-    <EmbeddedResource Include="Profiles\Json\Sony PlayStation 4.json" />
-    <EmbeddedResource Include="Profiles\Json\Vlc.json" />
-    <EmbeddedResource Include="Profiles\Json\WDTV Live.json" />
-    <EmbeddedResource Include="Profiles\Json\Xbox 360.json" />
-    <EmbeddedResource Include="Profiles\Json\Xbox One.json" />
-  </ItemGroup>
   <ItemGroup>
     <Compile Include="Common\Argument.cs" />
     <Compile Include="Common\DeviceIcon.cs" />
@@ -111,16 +79,6 @@
     <Compile Include="PlayTo\uParserObject.cs" />
     <Compile Include="PlayTo\UpnpContainer.cs" />
     <Compile Include="PlayTo\uPnpNamespaces.cs" />
-    <Compile Include="ProfileSerialization\CodecProfile.cs" />
-    <Compile Include="ProfileSerialization\ContainerProfile.cs" />
-    <Compile Include="ProfileSerialization\DeviceProfile.cs" />
-    <Compile Include="ProfileSerialization\DirectPlayProfile.cs" />
-    <Compile Include="ProfileSerialization\HttpHeaderInfo.cs" />
-    <Compile Include="ProfileSerialization\ProfileCondition.cs" />
-    <Compile Include="ProfileSerialization\ResponseProfile.cs" />
-    <Compile Include="ProfileSerialization\SubtitleProfile.cs" />
-    <Compile Include="ProfileSerialization\TranscodingProfile.cs" />
-    <Compile Include="ProfileSerialization\XmlAttribute.cs" />
     <Compile Include="Profiles\BubbleUpnpProfile.cs" />
     <Compile Include="Profiles\DefaultProfile.cs" />
     <Compile Include="Profiles\DenonAvrProfile.cs" />
@@ -190,6 +148,38 @@
       <Name>RSSDP</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup />
+  <ItemGroup>
+    <EmbeddedResource Include="Profiles\Xml\BubbleUPnp.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Default.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Denon AVR.xml" />
+    <EmbeddedResource Include="Profiles\Xml\DirecTV HD-DVR.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Dish Hopper-Joey.xml" />
+    <EmbeddedResource Include="Profiles\Xml\foobar2000.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Kodi.xml" />
+    <EmbeddedResource Include="Profiles\Xml\LG Smart TV.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Linksys DMA2100.xml" />
+    <EmbeddedResource Include="Profiles\Xml\MediaMonkey.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Panasonic Viera.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Popcorn Hour.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Samsung Smart TV.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player 2013.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player 2014.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player 2015.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player 2016.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Blu-ray Player.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Bravia %282010%29.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Bravia %282011%29.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Bravia %282012%29.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Bravia %282013%29.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony Bravia %282014%29.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony PlayStation 3.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Sony PlayStation 4.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Vlc.xml" />
+    <EmbeddedResource Include="Profiles\Xml\WDTV Live.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Xbox 360.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Xbox One.xml" />
+  </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

+ 0 - 68
Emby.Dlna/ProfileSerialization/CodecProfile.cs

@@ -1,68 +0,0 @@
-using MediaBrowser.Model.Extensions;
-using System.Collections.Generic;
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    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 List<string> GetCodecs()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (Codec ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-
-        public List<string> GetContainers()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (Container ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-
-        private bool ContainsContainer(string container)
-        {
-            List<string> containers = GetContainers();
-
-            return containers.Count == 0 || ListHelper.ContainsIgnoreCase(containers, container ?? string.Empty);
-        }
-
-        public bool ContainsCodec(string codec, string container)
-        {
-            if (!ContainsContainer(container))
-            {
-                return false;
-            }
-
-            List<string> codecs = GetCodecs();
-
-            return codecs.Count == 0 || ListHelper.ContainsIgnoreCase(codecs, codec);
-        }
-    }
-}

+ 0 - 31
Emby.Dlna/ProfileSerialization/ContainerProfile.cs

@@ -1,31 +0,0 @@
-using System.Collections.Generic;
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class ContainerProfile
-    {
-        [XmlAttribute("type")]
-        public DlnaProfileType Type { get; set; }
-        public ProfileCondition[] Conditions { get; set; }
-
-        [XmlAttribute("container")]
-        public string Container { get; set; }
-
-        public ContainerProfile()
-        {
-            Conditions = new ProfileCondition[] { };
-        }
-
-        public List<string> GetContainers()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (Container ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-    }
-}

+ 0 - 351
Emby.Dlna/ProfileSerialization/DeviceProfile.cs

@@ -1,351 +0,0 @@
-using MediaBrowser.Model.Extensions;
-using MediaBrowser.Model.MediaInfo;
-using System.Collections.Generic;
-using System.Xml.Serialization;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    [XmlRoot("Profile")]
-    public class DeviceProfile
-    {
-        /// <summary>
-        /// Gets or sets the name.
-        /// </summary>
-        /// <value>The name.</value>
-        public string Name { get; set; }
-
-        [XmlIgnore]
-        public string Id { get; set; }
-
-        [XmlIgnore]
-        public MediaBrowser.Model.Dlna.DeviceProfileType ProfileType { get; set; }
-
-        /// <summary>
-        /// Gets or sets the identification.
-        /// </summary>
-        /// <value>The identification.</value>
-        public MediaBrowser.Model.Dlna.DeviceIdentification Identification { get; set; }
-
-        public string FriendlyName { get; set; }
-        public string Manufacturer { get; set; }
-        public string ManufacturerUrl { get; set; }
-        public string ModelName { get; set; }
-        public string ModelDescription { get; set; }
-        public string ModelNumber { get; set; }
-        public string ModelUrl { get; set; }
-        public string SerialNumber { get; set; }
-
-        public bool EnableAlbumArtInDidl { get; set; }
-        public bool EnableSingleAlbumArtLimit { get; set; }
-        public bool EnableSingleSubtitleLimit { get; set; }
-
-        public string SupportedMediaTypes { get; set; }
-
-        public string UserId { get; set; }
-
-        public string AlbumArtPn { get; set; }
-
-        public int MaxAlbumArtWidth { get; set; }
-        public int MaxAlbumArtHeight { get; set; }
-
-        public int? MaxIconWidth { get; set; }
-        public int? MaxIconHeight { get; set; }
-
-        public int? MaxStreamingBitrate { get; set; }
-        public int? MaxStaticBitrate { get; set; }
-
-        public int? MusicStreamingTranscodingBitrate { get; set; }
-        public int? MaxStaticMusicBitrate { get; set; }
-
-        /// <summary>
-        /// Controls the content of the X_DLNADOC element in the urn:schemas-dlna-org:device-1-0 namespace.
-        /// </summary>
-        public string XDlnaDoc { get; set; }
-        /// <summary>
-        /// Controls the content of the X_DLNACAP element in the urn:schemas-dlna-org:device-1-0 namespace.
-        /// </summary>
-        public string XDlnaCap { get; set; }
-        /// <summary>
-        /// Controls the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace.
-        /// </summary>
-        public string SonyAggregationFlags { get; set; }
-
-        public string ProtocolInfo { get; set; }
-
-        public int TimelineOffsetSeconds { get; set; }
-        public bool RequiresPlainVideoItems { get; set; }
-        public bool RequiresPlainFolders { get; set; }
-
-        public bool EnableMSMediaReceiverRegistrar { get; set; }
-        public bool IgnoreTranscodeByteRangeRequests { get; set; }
-
-        public XmlAttribute[] XmlRootAttributes { get; set; }
-
-        /// <summary>
-        /// Gets or sets the direct play profiles.
-        /// </summary>
-        /// <value>The direct play profiles.</value>
-        public DirectPlayProfile[] DirectPlayProfiles { get; set; }
-
-        /// <summary>
-        /// Gets or sets the transcoding profiles.
-        /// </summary>
-        /// <value>The transcoding profiles.</value>
-        public TranscodingProfile[] TranscodingProfiles { get; set; }
-
-        public ContainerProfile[] ContainerProfiles { get; set; }
-
-        public CodecProfile[] CodecProfiles { get; set; }
-        public ResponseProfile[] ResponseProfiles { get; set; }
-
-        public SubtitleProfile[] SubtitleProfiles { get; set; }
-
-        public DeviceProfile()
-        {
-            DirectPlayProfiles = new DirectPlayProfile[] { };
-            TranscodingProfiles = new TranscodingProfile[] { };
-            ResponseProfiles = new ResponseProfile[] { };
-            CodecProfiles = new CodecProfile[] { };
-            ContainerProfiles = new ContainerProfile[] { };
-            SubtitleProfiles = new SubtitleProfile[] { };
-
-            XmlRootAttributes = new XmlAttribute[] { };
-
-            SupportedMediaTypes = "Audio,Photo,Video";
-            MaxStreamingBitrate = 8000000;
-            MaxStaticBitrate = 8000000;
-            MusicStreamingTranscodingBitrate = 128000;
-        }
-
-        public List<string> GetSupportedMediaTypes()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (SupportedMediaTypes ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i))
-                    list.Add(i);
-            }
-            return list;
-        }
-
-        public TranscodingProfile GetAudioTranscodingProfile(string container, string audioCodec)
-        {
-            container = StringHelper.TrimStart(container ?? string.Empty, '.');
-
-            foreach (var i in TranscodingProfiles)
-            {
-                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Audio)
-                {
-                    continue;
-                }
-
-                if (!StringHelper.EqualsIgnoreCase(container, i.Container))
-                {
-                    continue;
-                }
-
-                if (!ListHelper.ContainsIgnoreCase(i.GetAudioCodecs(), audioCodec ?? string.Empty))
-                {
-                    continue;
-                }
-
-                return i;
-            }
-            return null;
-        }
-
-        public TranscodingProfile GetVideoTranscodingProfile(string container, string audioCodec, string videoCodec)
-        {
-            container = StringHelper.TrimStart(container ?? string.Empty, '.');
-
-            foreach (var i in TranscodingProfiles)
-            {
-                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Video)
-                {
-                    continue;
-                }
-
-                if (!StringHelper.EqualsIgnoreCase(container, i.Container))
-                {
-                    continue;
-                }
-
-                if (!ListHelper.ContainsIgnoreCase(i.GetAudioCodecs(), audioCodec ?? string.Empty))
-                {
-                    continue;
-                }
-
-                if (!StringHelper.EqualsIgnoreCase(videoCodec, i.VideoCodec ?? string.Empty))
-                {
-                    continue;
-                }
-
-                return i;
-            }
-            return null;
-        }
-
-        public ResponseProfile GetAudioMediaProfile(string container, string audioCodec, int? audioChannels, int? audioBitrate)
-        {
-            container = StringHelper.TrimStart(container ?? string.Empty, '.');
-
-            foreach (var i in ResponseProfiles)
-            {
-                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Audio)
-                {
-                    continue;
-                }
-
-                List<string> containers = i.GetContainers();
-                if (containers.Count > 0 && !ListHelper.ContainsIgnoreCase(containers, container))
-                {
-                    continue;
-                }
-
-                List<string> audioCodecs = i.GetAudioCodecs();
-                if (audioCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(audioCodecs, audioCodec ?? string.Empty))
-                {
-                    continue;
-                }
-
-                var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor();
-
-                var anyOff = false;
-                foreach (ProfileCondition c in i.Conditions)
-                {
-                    if (!conditionProcessor.IsAudioConditionSatisfied(GetModelProfileCondition(c), audioChannels, audioBitrate))
-                    {
-                        anyOff = true;
-                        break;
-                    }
-                }
-
-                if (anyOff)
-                {
-                    continue;
-                }
-
-                return i;
-            }
-            return null;
-        }
-
-        private MediaBrowser.Model.Dlna.ProfileCondition GetModelProfileCondition(ProfileCondition c)
-        {
-            return new MediaBrowser.Model.Dlna.ProfileCondition
-            {
-                Condition = c.Condition,
-                IsRequired = c.IsRequired,
-                Property = c.Property,
-                Value = c.Value
-            };
-        }
-
-        public ResponseProfile GetImageMediaProfile(string container, int? width, int? height)
-        {
-            container = StringHelper.TrimStart(container ?? string.Empty, '.');
-
-            foreach (var i in ResponseProfiles)
-            {
-                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Photo)
-                {
-                    continue;
-                }
-
-                List<string> containers = i.GetContainers();
-                if (containers.Count > 0 && !ListHelper.ContainsIgnoreCase(containers, container))
-                {
-                    continue;
-                }
-
-                var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor();
-
-                var anyOff = false;
-                foreach (ProfileCondition c in i.Conditions)
-                {
-                    if (!conditionProcessor.IsImageConditionSatisfied(GetModelProfileCondition(c), width, height))
-                    {
-                        anyOff = true;
-                        break;
-                    }
-                }
-
-                if (anyOff)
-                {
-                    continue;
-                }
-
-                return i;
-            }
-            return null;
-        }
-
-        public ResponseProfile GetVideoMediaProfile(string container,
-            string audioCodec,
-            string videoCodec,
-            int? width,
-            int? height,
-            int? bitDepth,
-            int? videoBitrate,
-            string videoProfile,
-            double? videoLevel,
-            float? videoFramerate,
-            int? packetLength,
-            TransportStreamTimestamp timestamp,
-            bool? isAnamorphic,
-            int? refFrames,
-            int? numVideoStreams,
-            int? numAudioStreams,
-            string videoCodecTag,
-            bool? isAvc)
-        {
-            container = StringHelper.TrimStart(container ?? string.Empty, '.');
-
-            foreach (var i in ResponseProfiles)
-            {
-                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Video)
-                {
-                    continue;
-                }
-
-                List<string> containers = i.GetContainers();
-                if (containers.Count > 0 && !ListHelper.ContainsIgnoreCase(containers, container ?? string.Empty))
-                {
-                    continue;
-                }
-
-                List<string> audioCodecs = i.GetAudioCodecs();
-                if (audioCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(audioCodecs, audioCodec ?? string.Empty))
-                {
-                    continue;
-                }
-
-                List<string> videoCodecs = i.GetVideoCodecs();
-                if (videoCodecs.Count > 0 && !ListHelper.ContainsIgnoreCase(videoCodecs, videoCodec ?? string.Empty))
-                {
-                    continue;
-                }
-
-                var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor();
-
-                var anyOff = false;
-                foreach (ProfileCondition c in i.Conditions)
-                {
-                    if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
-                    {
-                        anyOff = true;
-                        break;
-                    }
-                }
-
-                if (anyOff)
-                {
-                    continue;
-                }
-
-                return i;
-            }
-            return null;
-        }
-    }
-}

+ 0 - 51
Emby.Dlna/ProfileSerialization/DirectPlayProfile.cs

@@ -1,51 +0,0 @@
-using System.Collections.Generic;
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class DirectPlayProfile
-    {
-        [XmlAttribute("container")]
-        public string Container { get; set; }
-
-        [XmlAttribute("audioCodec")]
-        public string AudioCodec { get; set; }
-
-        [XmlAttribute("videoCodec")]
-        public string VideoCodec { get; set; }
-
-        [XmlAttribute("type")]
-        public DlnaProfileType Type { get; set; }
-
-        public List<string> GetContainers()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (Container ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-
-        public List<string> GetAudioCodecs()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (AudioCodec ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-
-        public List<string> GetVideoCodecs()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (VideoCodec ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-    }
-}

+ 0 - 17
Emby.Dlna/ProfileSerialization/HttpHeaderInfo.cs

@@ -1,17 +0,0 @@
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class HttpHeaderInfo
-    {
-        [XmlAttribute("name")]
-        public string Name { get; set; }
-
-        [XmlAttribute("value")]
-        public string Value { get; set; }
-
-        [XmlAttribute("match")]
-        public HeaderMatchType Match { get; set; }
-    }
-}

+ 0 - 39
Emby.Dlna/ProfileSerialization/ProfileCondition.cs

@@ -1,39 +0,0 @@
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class ProfileCondition
-    {
-        [XmlAttribute("condition")]
-        public ProfileConditionType Condition { get; set; }
-
-        [XmlAttribute("property")]
-        public ProfileConditionValue Property { get; set; }
-
-        [XmlAttribute("value")]
-        public string Value { get; set; }
-
-        [XmlAttribute("isRequired")]
-        public bool IsRequired { get; set; }
-
-        public ProfileCondition()
-        {
-            IsRequired = true;
-        }
-
-        public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value)
-            : this(condition, property, value, false)
-        {
-            
-        }
-
-        public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value, bool isRequired)
-        {
-            Condition = condition;
-            Property = property;
-            Value = value;
-            IsRequired = isRequired;
-        }
-    }
-}

+ 0 - 64
Emby.Dlna/ProfileSerialization/ResponseProfile.cs

@@ -1,64 +0,0 @@
-using System.Collections.Generic;
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class ResponseProfile
-    {
-        [XmlAttribute("container")]
-        public string Container { get; set; }
-
-        [XmlAttribute("audioCodec")]
-        public string AudioCodec { get; set; }
-
-        [XmlAttribute("videoCodec")]
-        public string VideoCodec { get; set; }
-
-        [XmlAttribute("type")]
-        public DlnaProfileType Type { get; set; }
-
-        [XmlAttribute("orgPn")]
-        public string OrgPn { get; set; }
-
-        [XmlAttribute("mimeType")]
-        public string MimeType { get; set; }
-
-        public ProfileCondition[] Conditions { get; set; }
-
-        public ResponseProfile()
-        {
-            Conditions = new ProfileCondition[] {};
-        }
-
-        public List<string> GetContainers()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (Container ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-
-        public List<string> GetAudioCodecs()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (AudioCodec ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-
-        public List<string> GetVideoCodecs()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (VideoCodec ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-    }
-}

+ 0 - 48
Emby.Dlna/ProfileSerialization/SubtitleProfile.cs

@@ -1,48 +0,0 @@
-using MediaBrowser.Model.Extensions;
-using System.Collections.Generic;
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class SubtitleProfile
-    {
-        [XmlAttribute("format")]
-        public string Format { get; set; }
-
-        [XmlAttribute("method")]
-        public SubtitleDeliveryMethod Method { get; set; }
-
-        [XmlAttribute("didlMode")]
-        public string DidlMode { get; set; }
-
-        [XmlAttribute("language")]
-        public string Language { get; set; }
-
-        public List<string> GetLanguages()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (Language ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-
-        public bool SupportsLanguage(string subLanguage)
-        {
-            if (string.IsNullOrEmpty(Language))
-            {
-                return true;
-            }
-
-            if (string.IsNullOrEmpty(subLanguage))
-            {
-                subLanguage = "und";
-            }
-
-            List<string> languages = GetLanguages();
-            return languages.Count == 0 || ListHelper.ContainsIgnoreCase(languages, subLanguage);
-        }
-    }
-}

+ 0 - 58
Emby.Dlna/ProfileSerialization/TranscodingProfile.cs

@@ -1,58 +0,0 @@
-using System.Collections.Generic;
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class TranscodingProfile
-    {
-        [XmlAttribute("container")]
-        public string Container { get; set; }
-
-        [XmlAttribute("type")]
-        public DlnaProfileType Type { get; set; }
-
-        [XmlAttribute("videoCodec")]
-        public string VideoCodec { get; set; }
-
-        [XmlAttribute("audioCodec")]
-        public string AudioCodec { get; set; }
-
-        [XmlAttribute("protocol")]
-        public string Protocol { get; set; }
-
-        [XmlAttribute("estimateContentLength")]
-        public bool EstimateContentLength { get; set; }
-
-        [XmlAttribute("enableMpegtsM2TsMode")]
-        public bool EnableMpegtsM2TsMode { get; set; }
-
-        [XmlAttribute("transcodeSeekInfo")]
-        public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
-
-        [XmlAttribute("copyTimestamps")]
-        public bool CopyTimestamps { get; set; }
-
-        [XmlAttribute("context")]
-        public EncodingContext Context { get; set; }
-
-        [XmlAttribute("enableSubtitlesInManifest")]
-        public bool EnableSubtitlesInManifest { get; set; }
-
-        [XmlAttribute("enableSplittingOnNonKeyFrames")]
-        public bool EnableSplittingOnNonKeyFrames { get; set; }
-
-        [XmlAttribute("maxAudioChannels")]
-        public string MaxAudioChannels { get; set; }
-
-        public List<string> GetAudioCodecs()
-        {
-            List<string> list = new List<string>();
-            foreach (string i in (AudioCodec ?? string.Empty).Split(','))
-            {
-                if (!string.IsNullOrEmpty(i)) list.Add(i);
-            }
-            return list;
-        }
-    }
-}

+ 0 - 13
Emby.Dlna/ProfileSerialization/XmlAttribute.cs

@@ -1,13 +0,0 @@
-using System.Xml.Serialization;
-
-namespace Emby.Dlna.ProfileSerialization
-{
-    public class XmlAttribute
-    {
-        [XmlAttribute("name")]
-        public string Name { get; set; }
-
-        [XmlAttribute("value")]
-        public string Value { get; set; }
-    }
-}

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/BubbleUPnp.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Default.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Denon AVR.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/DirecTV HD-DVR.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Dish Hopper-Joey.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Kodi.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/LG Smart TV.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Linksys DMA2100.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/MediaMonkey.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Panasonic Viera.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Popcorn Hour.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Samsung Smart TV.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2013.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2014.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2015.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Blu-ray Player 2016.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Blu-ray Player.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Bravia (2010).json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Bravia (2011).json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Bravia (2012).json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Bravia (2013).json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony Bravia (2014).json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony PlayStation 3.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Sony PlayStation 4.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Vlc.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/WDTV Live.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Xbox 360.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/Xbox One.json


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Emby.Dlna/Profiles/Json/foobar2000.json


Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/BubbleUPnp.xml


Fișier diff suprimat deoarece este prea mare
+ 23 - 0
Emby.Dlna/Profiles/Xml/Default.xml


Fișier diff suprimat deoarece este prea mare
+ 28 - 0
Emby.Dlna/Profiles/Xml/Denon AVR.xml


Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml


+ 92 - 0
Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<Profile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <Name>Dish Hopper-Joey</Name>
+  <Identification>
+    <Manufacturer>Echostar Technologies LLC</Manufacturer>
+    <ManufacturerUrl>http://www.echostar.com</ManufacturerUrl>
+    <Headers>
+      <HttpHeaderInfo name="User-Agent" value="XiP" match="Substring" />
+    </Headers>
+  </Identification>
+  <Manufacturer>Emby</Manufacturer>
+  <ManufacturerUrl>http://emby.media/</ManufacturerUrl>
+  <ModelName>Emby Server</ModelName>
+  <ModelDescription>Emby</ModelDescription>
+  <ModelNumber>Emby</ModelNumber>
+  <ModelUrl>http://emby.media/</ModelUrl>
+  <EnableAlbumArtInDidl>false</EnableAlbumArtInDidl>
+  <EnableSingleAlbumArtLimit>false</EnableSingleAlbumArtLimit>
+  <EnableSingleSubtitleLimit>false</EnableSingleSubtitleLimit>
+  <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_SM</AlbumArtPn>
+  <MaxAlbumArtWidth>480</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>480</MaxAlbumArtHeight>
+  <MaxIconWidth>48</MaxIconWidth>
+  <MaxIconHeight>48</MaxIconHeight>
+  <MaxStreamingBitrate>24000000</MaxStreamingBitrate>
+  <MaxStaticBitrate>24000000</MaxStaticBitrate>
+  <MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
+  <MaxStaticMusicBitrate xsi:nil="true" />
+  <XDlnaDoc>DMS-1.50</XDlnaDoc>
+  <ProtocolInfo>http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*</ProtocolInfo>
+  <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
+  <RequiresPlainVideoItems>false</RequiresPlainVideoItems>
+  <RequiresPlainFolders>false</RequiresPlainFolders>
+  <EnableMSMediaReceiverRegistrar>false</EnableMSMediaReceiverRegistrar>
+  <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
+  <XmlRootAttributes />
+  <DirectPlayProfiles>
+    <DirectPlayProfile container="mp4,mkv,mpeg,ts" audioCodec="mp3,ac3,aac,he-aac,pcm" videoCodec="h264,mpeg2video" type="Video" />
+    <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
+    <DirectPlayProfile container="alac" audioCodec="alac" type="Audio" />
+    <DirectPlayProfile container="flac" audioCodec="flac" type="Audio" />
+    <DirectPlayProfile container="jpeg" type="Photo" />
+  </DirectPlayProfiles>
+  <TranscodingProfiles>
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+    <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+  </TranscodingProfiles>
+  <ContainerProfiles />
+  <CodecProfiles>
+    <CodecProfile type="Video" codec="h264">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="Video">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="VideoAudio" codec="ac3,he-aac">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="VideoAudio" codec="aac">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+  </CodecProfiles>
+  <ResponseProfiles>
+    <ResponseProfile container="mkv,ts" type="Video" mimeType="video/mp4">
+      <Conditions />
+    </ResponseProfile>
+  </ResponseProfiles>
+  <SubtitleProfiles>
+    <SubtitleProfile format="srt" method="Embed" />
+  </SubtitleProfiles>
+</Profile>

Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/Kodi.xml


Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/LG Smart TV.xml


Fișier diff suprimat deoarece este prea mare
+ 27 - 0
Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml


Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/MediaMonkey.xml


Fișier diff suprimat deoarece este prea mare
+ 30 - 0
Emby.Dlna/Profiles/Xml/Panasonic Viera.xml


Fișier diff suprimat deoarece este prea mare
+ 23 - 0
Emby.Dlna/Profiles/Xml/Popcorn Hour.xml


Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml


Fișier diff suprimat deoarece este prea mare
+ 33 - 0
Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml


Fișier diff suprimat deoarece este prea mare
+ 33 - 0
Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml


+ 133 - 0
Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml

@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<Profile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <Name>Sony Bravia (2010)</Name>
+  <Identification>
+    <FriendlyName>KDL-\d{2}[EHLNPB]X\d[01]\d.*</FriendlyName>
+    <Manufacturer>Sony</Manufacturer>
+    <Headers>
+      <HttpHeaderInfo name="X-AV-Client-Info" value=".*KDL-\d{2}[EHLNPB]X\d[01]\d.*" match="Regex" />
+    </Headers>
+  </Identification>
+  <Manufacturer>Microsoft Corporation</Manufacturer>
+  <ManufacturerUrl>http://www.microsoft.com/</ManufacturerUrl>
+  <ModelName>Windows Media Player Sharing</ModelName>
+  <ModelDescription>Emby</ModelDescription>
+  <ModelNumber>3.0</ModelNumber>
+  <ModelUrl>http://www.microsoft.com/</ModelUrl>
+  <EnableAlbumArtInDidl>true</EnableAlbumArtInDidl>
+  <EnableSingleAlbumArtLimit>true</EnableSingleAlbumArtLimit>
+  <EnableSingleSubtitleLimit>false</EnableSingleSubtitleLimit>
+  <SupportedMediaTypes>Audio,Photo,Video</SupportedMediaTypes>
+  <AlbumArtPn>JPEG_TN</AlbumArtPn>
+  <MaxAlbumArtWidth>480</MaxAlbumArtWidth>
+  <MaxAlbumArtHeight>480</MaxAlbumArtHeight>
+  <MaxIconWidth>48</MaxIconWidth>
+  <MaxIconHeight>48</MaxIconHeight>
+  <MaxStreamingBitrate>24000000</MaxStreamingBitrate>
+  <MaxStaticBitrate>24000000</MaxStaticBitrate>
+  <MusicStreamingTranscodingBitrate>192000</MusicStreamingTranscodingBitrate>
+  <MaxStaticMusicBitrate xsi:nil="true" />
+  <XDlnaDoc>DMS-1.50</XDlnaDoc>
+  <SonyAggregationFlags>10</SonyAggregationFlags>
+  <ProtocolInfo>http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000</ProtocolInfo>
+  <TimelineOffsetSeconds>0</TimelineOffsetSeconds>
+  <RequiresPlainVideoItems>false</RequiresPlainVideoItems>
+  <RequiresPlainFolders>false</RequiresPlainFolders>
+  <EnableMSMediaReceiverRegistrar>false</EnableMSMediaReceiverRegistrar>
+  <IgnoreTranscodeByteRangeRequests>false</IgnoreTranscodeByteRangeRequests>
+  <XmlRootAttributes>
+    <XmlAttribute name="xmlns:av" value="urn:schemas-sony-com:av" />
+  </XmlRootAttributes>
+  <DirectPlayProfiles>
+    <DirectPlayProfile container="ts" audioCodec="ac3,aac,mp3" videoCodec="h264" type="Video" />
+    <DirectPlayProfile container="ts" audioCodec="mp3,mp2" videoCodec="mpeg1video,mpeg2video" type="Video" />
+    <DirectPlayProfile container="mpeg" audioCodec="mp3,mp2" videoCodec="mpeg2video,mpeg1video" type="Video" />
+    <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
+  </DirectPlayProfiles>
+  <TranscodingProfiles>
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" enableSplittingOnNonKeyFrames="false" />
+  </TranscodingProfiles>
+  <ContainerProfiles>
+    <ContainerProfile type="Photo">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+      </Conditions>
+    </ContainerProfile>
+  </ContainerProfiles>
+  <CodecProfiles>
+    <CodecProfile type="Video" codec="h264">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="Video" codec="mpeg2video">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="Video">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="VideoAudio" codec="ac3">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="VideoAudio" codec="aac">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
+        <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+    <CodecProfile type="VideoAudio" codec="mp3,mp2">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
+      </Conditions>
+      <ApplyConditions />
+    </CodecProfile>
+  </CodecProfiles>
+  <ResponseProfiles>
+    <ResponseProfile container="ts" audioCodec="ac3,aac,mp3" videoCodec="h264" type="Video" orgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T" mimeType="video/vnd.dlna.mpeg-tts">
+      <Conditions>
+        <ProfileCondition condition="Equals" property="PacketLength" value="192" isRequired="true" />
+        <ProfileCondition condition="Equals" property="VideoTimestamp" value="Valid" isRequired="true" />
+      </Conditions>
+    </ResponseProfile>
+    <ResponseProfile container="ts" audioCodec="ac3,aac,mp3" videoCodec="h264" type="Video" orgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO" mimeType="video/mpeg">
+      <Conditions>
+        <ProfileCondition condition="Equals" property="PacketLength" value="188" isRequired="true" />
+      </Conditions>
+    </ResponseProfile>
+    <ResponseProfile container="ts" audioCodec="ac3,aac,mp3" videoCodec="h264" type="Video" orgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU" mimeType="video/vnd.dlna.mpeg-tts">
+      <Conditions />
+    </ResponseProfile>
+    <ResponseProfile container="ts" videoCodec="mpeg2video" type="Video" orgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO" mimeType="video/vnd.dlna.mpeg-tts">
+      <Conditions />
+    </ResponseProfile>
+    <ResponseProfile container="mpeg" videoCodec="mpeg1video,mpeg2video" type="Video" orgPn="MPEG_PS_NTSC,MPEG_PS_PAL" mimeType="video/mpeg">
+      <Conditions />
+    </ResponseProfile>
+  </ResponseProfiles>
+  <SubtitleProfiles>
+    <SubtitleProfile format="srt" method="Embed" />
+  </SubtitleProfiles>
+</Profile>

Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml


Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/Vlc.xml


Fișier diff suprimat deoarece este prea mare
+ 30 - 0
Emby.Dlna/Profiles/Xml/WDTV Live.xml


Fișier diff suprimat deoarece este prea mare
+ 31 - 0
Emby.Dlna/Profiles/Xml/Xbox 360.xml


Fișier diff suprimat deoarece este prea mare
+ 30 - 0
Emby.Dlna/Profiles/Xml/Xbox One.xml


Fișier diff suprimat deoarece este prea mare
+ 29 - 0
Emby.Dlna/Profiles/Xml/foobar2000.xml


+ 0 - 1
Emby.Server.Core/ApplicationHost.cs

@@ -1216,7 +1216,6 @@ namespace Emby.Server.Core
             {
                 HasPendingRestart = HasPendingRestart,
                 Version = ApplicationVersion.ToString(),
-                IsNetworkDeployed = CanSelfUpdate,
                 WebSocketPortNumber = HttpPort,
                 FailedPluginAssemblies = FailedAssemblies.ToList(),
                 InProgressInstallations = InstallationManager.CurrentInstallations.Select(i => i.Item1).ToList(),

+ 12 - 1
MediaBrowser.Controller/Entities/Movies/Movie.cs

@@ -125,7 +125,18 @@ namespace MediaBrowser.Controller.Entities.Movies
 
             if (!DetectIsInMixedFolder())
             {
-                info.Name = System.IO.Path.GetFileName(ContainingFolderPath);
+                var name = System.IO.Path.GetFileName(ContainingFolderPath);
+
+                if (VideoType == VideoType.VideoFile || VideoType == VideoType.Iso)
+                {
+                    if (string.Equals(name, System.IO.Path.GetFileName(Path), StringComparison.OrdinalIgnoreCase))
+                    {
+                        // if the folder has the file extension, strip it
+                        name = System.IO.Path.GetFileNameWithoutExtension(name);
+                    }
+                }
+
+                info.Name = name;
             }
 
             return info;

+ 4 - 0
MediaBrowser.Model/Dlna/CodecProfile.cs

@@ -1,19 +1,23 @@
 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()

+ 3 - 0
MediaBrowser.Model/Dlna/ContainerProfile.cs

@@ -1,13 +1,16 @@
 using System.Collections.Generic;
 using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Model.Dlna
 {
     public class ContainerProfile
     {
+        [XmlAttribute("type")]
         public DlnaProfileType Type { get; set; }
         public ProfileCondition[] Conditions { get; set; }
 
+        [XmlAttribute("container")]
         public string Container { get; set; }
 
         public ContainerProfile()

+ 35 - 22
MediaBrowser.Model/Dlna/DeviceProfile.cs

@@ -1,10 +1,11 @@
 using MediaBrowser.Model.Extensions;
 using MediaBrowser.Model.MediaInfo;
 using System.Collections.Generic;
-using MediaBrowser.Model.Serialization;
+using System.Xml.Serialization;
 
 namespace MediaBrowser.Model.Dlna
 {
+    [XmlRoot("Profile")]
     public class DeviceProfile
     {
         /// <summary>
@@ -13,16 +14,17 @@ namespace MediaBrowser.Model.Dlna
         /// <value>The name.</value>
         public string Name { get; set; }
 
+        [XmlIgnore]
         public string Id { get; set; }
 
-        [IgnoreDataMember]
-        public DeviceProfileType ProfileType { get; set; }
+        [XmlIgnore]
+        public MediaBrowser.Model.Dlna.DeviceProfileType ProfileType { get; set; }
 
         /// <summary>
         /// Gets or sets the identification.
         /// </summary>
         /// <value>The identification.</value>
-        public DeviceIdentification Identification { get; set; }
+        public MediaBrowser.Model.Dlna.DeviceIdentification Identification { get; set; }
 
         public string FriendlyName { get; set; }
         public string Manufacturer { get; set; }
@@ -34,8 +36,8 @@ namespace MediaBrowser.Model.Dlna
         public string SerialNumber { get; set; }
 
         public bool EnableAlbumArtInDidl { get; set; }
-		public bool EnableSingleAlbumArtLimit { get; set; }
-		public bool EnableSingleSubtitleLimit { get; set; }
+        public bool EnableSingleAlbumArtLimit { get; set; }
+        public bool EnableSingleSubtitleLimit { get; set; }
 
         public string SupportedMediaTypes { get; set; }
 
@@ -97,7 +99,7 @@ namespace MediaBrowser.Model.Dlna
         public ResponseProfile[] ResponseProfiles { get; set; }
 
         public SubtitleProfile[] SubtitleProfiles { get; set; }
-      
+
         public DeviceProfile()
         {
             DirectPlayProfiles = new DirectPlayProfile[] { };
@@ -106,9 +108,9 @@ namespace MediaBrowser.Model.Dlna
             CodecProfiles = new CodecProfile[] { };
             ContainerProfiles = new ContainerProfile[] { };
             SubtitleProfiles = new SubtitleProfile[] { };
-         
+
             XmlRootAttributes = new XmlAttribute[] { };
-            
+
             SupportedMediaTypes = "Audio,Photo,Video";
             MaxStreamingBitrate = 8000000;
             MaxStaticBitrate = 8000000;
@@ -120,7 +122,7 @@ namespace MediaBrowser.Model.Dlna
             List<string> list = new List<string>();
             foreach (string i in (SupportedMediaTypes ?? string.Empty).Split(','))
             {
-                if (!string.IsNullOrEmpty(i)) 
+                if (!string.IsNullOrEmpty(i))
                     list.Add(i);
             }
             return list;
@@ -132,7 +134,7 @@ namespace MediaBrowser.Model.Dlna
 
             foreach (var i in TranscodingProfiles)
             {
-                if (i.Type != DlnaProfileType.Audio)
+                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Audio)
                 {
                     continue;
                 }
@@ -158,7 +160,7 @@ namespace MediaBrowser.Model.Dlna
 
             foreach (var i in TranscodingProfiles)
             {
-                if (i.Type != DlnaProfileType.Video)
+                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Video)
                 {
                     continue;
                 }
@@ -189,7 +191,7 @@ namespace MediaBrowser.Model.Dlna
 
             foreach (var i in ResponseProfiles)
             {
-                if (i.Type != DlnaProfileType.Audio)
+                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Audio)
                 {
                     continue;
                 }
@@ -206,12 +208,12 @@ namespace MediaBrowser.Model.Dlna
                     continue;
                 }
 
-                ConditionProcessor conditionProcessor = new ConditionProcessor();
+                var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor();
 
                 var anyOff = false;
                 foreach (ProfileCondition c in i.Conditions)
                 {
-                    if (!conditionProcessor.IsAudioConditionSatisfied(c, audioChannels, audioBitrate))
+                    if (!conditionProcessor.IsAudioConditionSatisfied(GetModelProfileCondition(c), audioChannels, audioBitrate))
                     {
                         anyOff = true;
                         break;
@@ -228,13 +230,24 @@ namespace MediaBrowser.Model.Dlna
             return null;
         }
 
+        private MediaBrowser.Model.Dlna.ProfileCondition GetModelProfileCondition(ProfileCondition c)
+        {
+            return new MediaBrowser.Model.Dlna.ProfileCondition
+            {
+                Condition = c.Condition,
+                IsRequired = c.IsRequired,
+                Property = c.Property,
+                Value = c.Value
+            };
+        }
+
         public ResponseProfile GetImageMediaProfile(string container, int? width, int? height)
         {
             container = StringHelper.TrimStart(container ?? string.Empty, '.');
 
             foreach (var i in ResponseProfiles)
             {
-                if (i.Type != DlnaProfileType.Photo)
+                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Photo)
                 {
                     continue;
                 }
@@ -245,12 +258,12 @@ namespace MediaBrowser.Model.Dlna
                     continue;
                 }
 
-                ConditionProcessor conditionProcessor = new ConditionProcessor();
+                var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor();
 
                 var anyOff = false;
                 foreach (ProfileCondition c in i.Conditions)
                 {
-                    if (!conditionProcessor.IsImageConditionSatisfied(c, width, height))
+                    if (!conditionProcessor.IsImageConditionSatisfied(GetModelProfileCondition(c), width, height))
                     {
                         anyOff = true;
                         break;
@@ -267,7 +280,7 @@ namespace MediaBrowser.Model.Dlna
             return null;
         }
 
-        public ResponseProfile GetVideoMediaProfile(string container, 
+        public ResponseProfile GetVideoMediaProfile(string container,
             string audioCodec,
             string videoCodec,
             int? width,
@@ -290,7 +303,7 @@ namespace MediaBrowser.Model.Dlna
 
             foreach (var i in ResponseProfiles)
             {
-                if (i.Type != DlnaProfileType.Video)
+                if (i.Type != MediaBrowser.Model.Dlna.DlnaProfileType.Video)
                 {
                     continue;
                 }
@@ -313,12 +326,12 @@ namespace MediaBrowser.Model.Dlna
                     continue;
                 }
 
-                ConditionProcessor conditionProcessor = new ConditionProcessor();
+                var conditionProcessor = new MediaBrowser.Model.Dlna.ConditionProcessor();
 
                 var anyOff = false;
                 foreach (ProfileCondition c in i.Conditions)
                 {
-                    if (!conditionProcessor.IsVideoConditionSatisfied(c, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
+                    if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
                     {
                         anyOff = true;
                         break;

+ 6 - 0
MediaBrowser.Model/Dlna/DirectPlayProfile.cs

@@ -1,15 +1,21 @@
 using System.Collections.Generic;
+using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Model.Dlna
 {
     public class DirectPlayProfile
     {
+        [XmlAttribute("container")]
         public string Container { get; set; }
 
+        [XmlAttribute("audioCodec")]
         public string AudioCodec { get; set; }
 
+        [XmlAttribute("videoCodec")]
         public string VideoCodec { get; set; }
 
+        [XmlAttribute("type")]
         public DlnaProfileType Type { get; set; }
 
         public List<string> GetContainers()

+ 4 - 0
MediaBrowser.Model/Dlna/HttpHeaderInfo.cs

@@ -1,13 +1,17 @@
 using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Model.Dlna
 {
     public class HttpHeaderInfo
     {
+        [XmlAttribute("name")]
         public string Name { get; set; }
 
+        [XmlAttribute("value")]
         public string Value { get; set; }
 
+        [XmlAttribute("match")]
         public HeaderMatchType Match { get; set; }
     }
 }

+ 5 - 0
MediaBrowser.Model/Dlna/ProfileCondition.cs

@@ -1,15 +1,20 @@
 using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Model.Dlna
 {
     public class ProfileCondition
     {
+        [XmlAttribute("condition")]
         public ProfileConditionType Condition { get; set; }
 
+        [XmlAttribute("property")]
         public ProfileConditionValue Property { get; set; }
 
+        [XmlAttribute("value")]
         public string Value { get; set; }
 
+        [XmlAttribute("isRequired")]
         public bool IsRequired { get; set; }
 
         public ProfileCondition()

+ 7 - 0
MediaBrowser.Model/Dlna/ResponseProfile.cs

@@ -1,20 +1,27 @@
 using System.Collections.Generic;
 using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Model.Dlna
 {
     public class ResponseProfile
     {
+        [XmlAttribute("container")]
         public string Container { get; set; }
 
+        [XmlAttribute("audioCodec")]
         public string AudioCodec { get; set; }
 
+        [XmlAttribute("videoCodec")]
         public string VideoCodec { get; set; }
 
+        [XmlAttribute("type")]
         public DlnaProfileType Type { get; set; }
 
+        [XmlAttribute("orgPn")]
         public string OrgPn { get; set; }
 
+        [XmlAttribute("mimeType")]
         public string MimeType { get; set; }
 
         public ProfileCondition[] Conditions { get; set; }

+ 5 - 0
MediaBrowser.Model/Dlna/SubtitleProfile.cs

@@ -1,17 +1,22 @@
 using MediaBrowser.Model.Extensions;
 using System.Collections.Generic;
 using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Model.Dlna
 {
     public class SubtitleProfile
     {
+        [XmlAttribute("format")]
         public string Format { get; set; }
 
+        [XmlAttribute("method")]
         public SubtitleDeliveryMethod Method { get; set; }
 
+        [XmlAttribute("didlMode")]
         public string DidlMode { get; set; }
 
+        [XmlAttribute("language")]
         public string Language { get; set; }
 
         public List<string> GetLanguages()

+ 14 - 0
MediaBrowser.Model/Dlna/TranscodingProfile.cs

@@ -1,34 +1,48 @@
 using System.Collections.Generic;
 using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
 
 namespace MediaBrowser.Model.Dlna
 {
     public class TranscodingProfile
     {
+        [XmlAttribute("container")]
         public string Container { get; set; }
 
+        [XmlAttribute("type")]
         public DlnaProfileType Type { get; set; }
 
+        [XmlAttribute("videoCodec")]
         public string VideoCodec { get; set; }
 
+        [XmlAttribute("audioCodec")]
         public string AudioCodec { get; set; }
 
+        [XmlAttribute("protocol")]
         public string Protocol { get; set; }
 
+        [XmlAttribute("estimateContentLength")]
         public bool EstimateContentLength { get; set; }
 
+        [XmlAttribute("enableMpegtsM2TsMode")]
         public bool EnableMpegtsM2TsMode { get; set; }
 
+        [XmlAttribute("transcodeSeekInfo")]
         public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
 
+        [XmlAttribute("copyTimestamps")]
         public bool CopyTimestamps { get; set; }
 
+        [XmlAttribute("context")]
         public EncodingContext Context { get; set; }
 
+        [XmlAttribute("enableSubtitlesInManifest")]
         public bool EnableSubtitlesInManifest { get; set; }
 
+        [XmlAttribute("enableSplittingOnNonKeyFrames")]
         public bool EnableSplittingOnNonKeyFrames { get; set; }
 
+        [XmlAttribute("maxAudioChannels")]
         public string MaxAudioChannels { get; set; }
 
         public List<string> GetAudioCodecs()

+ 2 - 0
MediaBrowser.Model/Dlna/XmlAttribute.cs

@@ -4,8 +4,10 @@ namespace MediaBrowser.Model.Dlna
 {
     public class XmlAttribute
     {
+        [XmlAttribute("name")]
         public string Name { get; set; }
 
+        [XmlAttribute("value")]
         public string Value { get; set; }
     }
 }

+ 0 - 6
MediaBrowser.Model/System/SystemInfo.cs

@@ -48,12 +48,6 @@ namespace MediaBrowser.Model.System
         /// <value><c>true</c> if [supports library monitor]; otherwise, <c>false</c>.</value>
         public bool SupportsLibraryMonitor { get; set; }
 
-        /// <summary>
-        /// Gets or sets a value indicating whether this instance is network deployed.
-        /// </summary>
-        /// <value><c>true</c> if this instance is network deployed; otherwise, <c>false</c>.</value>
-        public bool IsNetworkDeployed { get; set; }
-
         /// <summary>
         /// Gets or sets the in progress installations.
         /// </summary>

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff