瀏覽代碼

Merge pull request #2402 from MediaBrowser/dev

Dev
Luke 8 年之前
父節點
當前提交
61eb752efe

+ 1 - 0
Emby.Dlna/DlnaManager.cs

@@ -595,6 +595,7 @@ namespace Emby.Dlna
                 new LinksysDMA2100Profile(),
                 new LgTvProfile(),
                 new Foobar2000Profile(),
+                new SharpSmartTvProfile(),
                 new MediaMonkeyProfile(),
                 //new Windows81Profile(),
                 //new WindowsMediaCenterProfile(),

+ 4 - 1
Emby.Dlna/Emby.Dlna.csproj

@@ -92,6 +92,7 @@
     <Compile Include="Profiles\PanasonicVieraProfile.cs" />
     <Compile Include="Profiles\PopcornHourProfile.cs" />
     <Compile Include="Profiles\SamsungSmartTvProfile.cs" />
+    <Compile Include="Profiles\SharpSmartTvProfile.cs" />
     <Compile Include="Profiles\SonyBlurayPlayer2013.cs" />
     <Compile Include="Profiles\SonyBlurayPlayer2014.cs" />
     <Compile Include="Profiles\SonyBlurayPlayer2015.cs" />
@@ -148,7 +149,9 @@
       <Name>RSSDP</Name>
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <EmbeddedResource Include="Profiles\Xml\Sharp Smart TV.xml" />
+  </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Profiles\Xml\BubbleUPnp.xml" />
     <EmbeddedResource Include="Profiles\Xml\Default.xml" />

+ 116 - 0
Emby.Dlna/Profiles/SharpSmartTvProfile.cs

@@ -0,0 +1,116 @@
+using System.Xml.Serialization;
+using MediaBrowser.Model.Dlna;
+
+namespace Emby.Dlna.Profiles
+{
+    [XmlRoot("Profile")]
+    public class SharpSmartTvProfile : DefaultProfile
+    {
+        public SharpSmartTvProfile()
+        {
+            Name = "Sharp Smart TV";
+
+            Identification = new DeviceIdentification
+            {
+                Manufacturer = "Sharp",
+
+                Headers = new[]
+               {
+                   new HttpHeaderInfo
+                   {
+                       Name = "User-Agent",
+                       Value = "Sharp",
+                       Match = HeaderMatchType.Substring
+                   }
+               }
+            };
+
+            TranscodingProfiles = new[]
+            {
+                new TranscodingProfile
+                {
+                    Container = "mp3",
+                    AudioCodec = "mp3",
+                    Type = DlnaProfileType.Audio
+                },
+
+                new TranscodingProfile
+                {
+                    Container = "mkv",
+                    Type = DlnaProfileType.Video,
+                    AudioCodec = "ac3,aac,mp3,dts,dca",
+                    VideoCodec = "h264"
+                },
+
+                new TranscodingProfile
+                {
+                    Container = "jpeg",
+                    Type = DlnaProfileType.Photo
+                }
+            };
+
+            DirectPlayProfiles = new[]
+            {
+                new DirectPlayProfile
+                {
+                    Container = "m4v,mkv,avi,mov,mp4",
+                    VideoCodec = "h264,mpeg4",
+                    AudioCodec = "aac,mp3,ac3,dts,dca",
+                    Type = DlnaProfileType.Video
+                },
+
+                new DirectPlayProfile
+                {
+                    Container = "asf,wmv",
+                    Type = DlnaProfileType.Video
+                },
+
+                new DirectPlayProfile
+                {
+                    Container = "mpg,mpeg",
+                    VideoCodec = "mpeg2video",
+                    AudioCodec = "mp3,aac",
+                    Type = DlnaProfileType.Video
+                },
+
+                new DirectPlayProfile
+                {
+                    Container = "flv",
+                    VideoCodec = "h264",
+                    AudioCodec = "mp3,aac",
+                    Type = DlnaProfileType.Video
+                },
+
+                new DirectPlayProfile
+                {
+                    Container = "mp3,wav",
+                    Type = DlnaProfileType.Audio
+                }
+            };
+
+            SubtitleProfiles = new[]
+            {
+                new SubtitleProfile
+                {
+                    Format = "srt",
+                    Method = SubtitleDeliveryMethod.Embed
+                },
+                new SubtitleProfile
+                {
+                    Format = "srt",
+                    Method = SubtitleDeliveryMethod.External
+                }
+            };
+
+            ResponseProfiles = new[]
+            {
+                new ResponseProfile
+                {
+                    Container = "m4v",
+                    Type = DlnaProfileType.Video,
+                    MimeType = "video/mp4"
+                }
+            };
+        }
+    }
+}

文件差異過大導致無法顯示
+ 29 - 0
Emby.Dlna/Profiles/Xml/Sharp Smart TV.xml


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

@@ -1476,6 +1476,10 @@ namespace Emby.Server.Core
             try
             {
                 AuthorizeServer();
+            }
+            catch (NotImplementedException)
+            {
+                
             }
             catch (Exception ex)
             {

+ 0 - 3
MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj

@@ -888,9 +888,6 @@
     <Content Include="dashboard-ui\scripts\editorsidebar.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="dashboard-ui\scripts\mediacontroller.js">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
     <Content Include="dashboard-ui\scripts\metadatasubtitles.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>

部分文件因文件數量過多而無法顯示