浏览代码

added ps4 profile

Luke Pulverenti 10 年之前
父节点
当前提交
3ff3815b44

+ 1 - 0
MediaBrowser.Dlna/DlnaManager.cs

@@ -525,6 +525,7 @@ namespace MediaBrowser.Dlna
                 new Xbox360Profile(),
                 new Xbox360Profile(),
                 new XboxOneProfile(),
                 new XboxOneProfile(),
                 new SonyPs3Profile(),
                 new SonyPs3Profile(),
+                new SonyPs4Profile(),
                 new SonyBravia2010Profile(),
                 new SonyBravia2010Profile(),
                 new SonyBravia2011Profile(),
                 new SonyBravia2011Profile(),
                 new SonyBravia2012Profile(),
                 new SonyBravia2012Profile(),

+ 4 - 0
MediaBrowser.Dlna/MediaBrowser.Dlna.csproj

@@ -82,6 +82,7 @@
     <Compile Include="Profiles\DirectTvProfile.cs" />
     <Compile Include="Profiles\DirectTvProfile.cs" />
     <Compile Include="Profiles\DishHopperJoeyProfile.cs" />
     <Compile Include="Profiles\DishHopperJoeyProfile.cs" />
     <Compile Include="Profiles\PopcornHourProfile.cs" />
     <Compile Include="Profiles\PopcornHourProfile.cs" />
+    <Compile Include="Profiles\SonyPs4Profile.cs" />
     <Compile Include="Profiles\VlcProfile.cs" />
     <Compile Include="Profiles\VlcProfile.cs" />
     <Compile Include="Ssdp\DeviceDiscoveryInfo.cs" />
     <Compile Include="Ssdp\DeviceDiscoveryInfo.cs" />
     <Compile Include="Ssdp\Extensions.cs" />
     <Compile Include="Ssdp\Extensions.cs" />
@@ -210,6 +211,9 @@
     <EmbeddedResource Include="Profiles\Xml\BubbleUPnp.xml" />
     <EmbeddedResource Include="Profiles\Xml\BubbleUPnp.xml" />
     <EmbeddedResource Include="Profiles\Xml\Vlc.xml" />
     <EmbeddedResource Include="Profiles\Xml\Vlc.xml" />
   </ItemGroup>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Profiles\Xml\Sony PlayStation 4.xml" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- 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.
        Other similar extension points exist, see Microsoft.Common.targets.

+ 260 - 0
MediaBrowser.Dlna/Profiles/SonyPs4Profile.cs

@@ -0,0 +1,260 @@
+using MediaBrowser.Model.Dlna;
+using System.Xml.Serialization;
+
+namespace MediaBrowser.Dlna.Profiles
+{
+    [XmlRoot("Profile")]
+    public class SonyPs4Profile : DefaultProfile
+    {
+        public SonyPs4Profile()
+        {
+            Name = "Sony PlayStation 4";
+
+            Identification = new DeviceIdentification
+            {
+                FriendlyName = "PLAYSTATION 4",
+
+                Headers = new[]
+                {
+                    new HttpHeaderInfo
+                    {
+                        Name = "User-Agent",
+                        Value = @"PLAYSTATION 4",
+                        Match = HeaderMatchType.Substring
+                    },
+
+                    new HttpHeaderInfo
+                    {
+                        Name = "X-AV-Client-Info",
+                        Value = @"PLAYSTATION 4",
+                        Match = HeaderMatchType.Substring
+                    }
+                }
+            };
+
+            AlbumArtPn = "JPEG_TN";
+
+            SonyAggregationFlags = "10";
+            XDlnaDoc = "DMS-1.50";
+            EnableSingleAlbumArtLimit = true;
+
+            DirectPlayProfiles = new[]
+            {
+                new DirectPlayProfile
+                {
+                    Container = "avi",
+                    Type = DlnaProfileType.Video,
+                    VideoCodec = "mpeg4",
+                    AudioCodec = "mp2,mp3"
+                },
+                new DirectPlayProfile
+                {
+                    Container = "ts",
+                    Type = DlnaProfileType.Video,
+                    VideoCodec = "mpeg1video,mpeg2video,h264",
+                    AudioCodec = "ac3,mp2,mp3,aac"
+                },
+                new DirectPlayProfile
+                {
+                    Container = "mpeg",
+                    Type = DlnaProfileType.Video,
+                    VideoCodec = "mpeg1video,mpeg2video",
+                    AudioCodec = "mp2"
+                },
+                new DirectPlayProfile
+                {
+                    Container = "mp4,mkv",
+                    Type = DlnaProfileType.Video,
+                    VideoCodec = "h264,mpeg4",
+                    AudioCodec = "aac,ac3"
+                },
+                new DirectPlayProfile
+                {
+                    Container = "aac,mp3,wav",
+                    Type = DlnaProfileType.Audio
+                },
+                new DirectPlayProfile
+                {
+                    Container = "jpeg,png,gif,bmp,tiff",
+                    Type = DlnaProfileType.Photo
+                }
+            };
+
+            TranscodingProfiles = new[]
+            {
+                new TranscodingProfile
+                {
+                    Container = "mp3",
+                    AudioCodec = "mp3",
+                    Type = DlnaProfileType.Audio
+                },
+                new TranscodingProfile
+                {
+                    Container = "ts",
+                    VideoCodec = "h264",
+                    AudioCodec = "mp3",
+                    Type = DlnaProfileType.Video
+                },
+                new TranscodingProfile
+                {
+                    Container = "jpeg",
+                    Type = DlnaProfileType.Photo
+                }
+            };
+
+            ContainerProfiles = new[]
+            {
+                new ContainerProfile
+                {
+                    Type = DlnaProfileType.Photo,
+
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Width,
+                            Value = "1920"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Height,
+                            Value = "1080"
+                        }
+                    }
+                }
+            };
+
+            CodecProfiles = new[]
+            {
+                new CodecProfile
+                {
+                    Type = CodecType.Video,
+                    Codec = "h264",
+
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Width,
+                            Value = "1920"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Height,
+                            Value = "1080"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.VideoFramerate,
+                            Value = "30",
+                            IsRequired = false
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.VideoBitrate,
+                            Value = "15360000",
+                            IsRequired = false
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.VideoLevel,
+                            Value = "41",
+                            IsRequired = false
+                        }
+                    }
+                },
+
+                new CodecProfile
+                {
+                    Type = CodecType.VideoAudio,
+                    Codec = "ac3",
+
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.AudioChannels,
+                            Value = "6",
+                            IsRequired = false
+                        },
+
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.AudioBitrate,
+                            Value = "640000",
+                            IsRequired = false
+                        }
+                    }
+                },
+
+                new CodecProfile
+                {
+                    Type = CodecType.VideoAudio,
+                    Codec = "wmapro",
+
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.AudioChannels,
+                            Value = "2"
+                        }
+                    }
+                },
+
+                new CodecProfile
+                {
+                    Type = CodecType.VideoAudio,
+                    Codec = "aac",
+
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.NotEquals,
+                            Property = ProfileConditionValue.AudioProfile,
+                            Value = "he-aac",
+                            IsRequired = false
+                        }
+                    }
+                }
+            };
+
+            ResponseProfiles = new[]
+            {
+                new ResponseProfile
+                {
+                    Container = "mp4,mov",
+                    AudioCodec="aac",
+                    MimeType = "video/mp4",
+                    Type = DlnaProfileType.Video
+                },
+
+                new ResponseProfile
+                {
+                    Container = "avi",
+                    MimeType = "video/divx",
+                    OrgPn="AVI",
+                    Type = DlnaProfileType.Video
+                },
+
+                new ResponseProfile
+                {
+                    Container = "wav",
+                    MimeType = "audio/wav",
+                    Type = DlnaProfileType.Audio
+                }
+            };
+        }
+    }
+}

文件差异内容过多而无法显示
+ 31 - 0
MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml


+ 1 - 1
MediaBrowser.Server.Implementations/Localization/Server/server.json

@@ -1408,7 +1408,7 @@
     "HeaderUpcomingMovies": "Upcoming Movies",
     "HeaderUpcomingMovies": "Upcoming Movies",
     "HeaderUpcomingSports": "Upcoming Sports",
     "HeaderUpcomingSports": "Upcoming Sports",
     "HeaderUpcomingPrograms": "Upcoming Programs",
     "HeaderUpcomingPrograms": "Upcoming Programs",
-    "ButtonMoreItems": "More...",
+    "ButtonMoreItems": "More",
     "LabelShowLibraryTileNames": "Show library tile names",
     "LabelShowLibraryTileNames": "Show library tile names",
     "LabelShowLibraryTileNamesHelp": "Determines if labels will be displayed underneath library tiles on the home page",
     "LabelShowLibraryTileNamesHelp": "Determines if labels will be displayed underneath library tiles on the home page",
     "OptionEnableTranscodingThrottle": "Enable throttling",
     "OptionEnableTranscodingThrottle": "Enable throttling",

+ 7 - 4
MediaBrowser.WebDashboard/Api/PackageCreator.cs

@@ -274,11 +274,14 @@ namespace MediaBrowser.WebDashboard.Api
 
 
                 var version = GetType().Assembly.GetName().Version;
                 var version = GetType().Assembly.GetName().Version;
 
 
-                var imports = new[]
+                var imports = new string[]
                 {
                 {
-                    "thirdparty/polymer/polymer.html",
+                    //"thirdparty/polymer/polymer.html",
                     "thirdparty/paper-button/paper-button.html",
                     "thirdparty/paper-button/paper-button.html",
-                    "thirdparty/iron-icons/iron-icons.html"
+                    "thirdparty/paper-toast/paper-toast.html",
+                    "thirdparty/paper-spinner/paper-spinner.html",
+                    //"thirdparty/paper-icon-button/paper-icon-button.html",
+                    //"thirdparty/iron-icons/iron-icons.html"
                 };
                 };
                 var importsHtml = string.Join("", imports.Select(i => "<link rel=\"import\" href=\"" + i + "\">").ToArray());
                 var importsHtml = string.Join("", imports.Select(i => "<link rel=\"import\" href=\"" + i + "\">").ToArray());
 
 
@@ -342,7 +345,7 @@ namespace MediaBrowser.WebDashboard.Api
 
 
             if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
             if (string.Equals(mode, "cordova", StringComparison.OrdinalIgnoreCase))
             {
             {
-                sb.Append("<meta http-equiv=\"Content-Security-Policy\" content=\"default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'\">");
+                //sb.Append("<meta http-equiv=\"Content-Security-Policy\" content=\"default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'\">");
             }
             }
 
 
             sb.Append("<meta http-equiv=\"X-UA-Compatibility\" content=\"IE=Edge\">");
             sb.Append("<meta http-equiv=\"X-UA-Compatibility\" content=\"IE=Edge\">");

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

@@ -159,6 +159,9 @@
     <Content Include="dashboard-ui\thirdparty\cordova\wakeonlan.js">
     <Content Include="dashboard-ui\thirdparty\cordova\wakeonlan.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="dashboard-ui\thirdparty\iron-a11y-announcer\iron-a11y-announcer.html">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="dashboard-ui\thirdparty\iron-a11y-keys-behavior\iron-a11y-keys-behavior.html">
     <Content Include="dashboard-ui\thirdparty\iron-a11y-keys-behavior\iron-a11y-keys-behavior.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
@@ -201,6 +204,9 @@
     <Content Include="dashboard-ui\thirdparty\paper-button\paper-button.html">
     <Content Include="dashboard-ui\thirdparty\paper-button\paper-button.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="dashboard-ui\thirdparty\paper-icon-button\paper-icon-button.html">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="dashboard-ui\thirdparty\paper-material\paper-material.html">
     <Content Include="dashboard-ui\thirdparty\paper-material\paper-material.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
@@ -210,6 +216,12 @@
     <Content Include="dashboard-ui\thirdparty\paper-ripple\paper-ripple.html">
     <Content Include="dashboard-ui\thirdparty\paper-ripple\paper-ripple.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="dashboard-ui\thirdparty\paper-spinner\paper-spinner.css">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="dashboard-ui\thirdparty\paper-spinner\paper-spinner.html">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="dashboard-ui\thirdparty\paper-styles\classes\global.html">
     <Content Include="dashboard-ui\thirdparty\paper-styles\classes\global.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
@@ -240,6 +252,9 @@
     <Content Include="dashboard-ui\thirdparty\paper-styles\typography.html">
     <Content Include="dashboard-ui\thirdparty\paper-styles\typography.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>
+    <Content Include="dashboard-ui\thirdparty\paper-toast\paper-toast.html">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="dashboard-ui\thirdparty\polymer\LICENSE.txt">
     <Content Include="dashboard-ui\thirdparty\polymer\LICENSE.txt">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
     </Content>

部分文件因为文件数量过多而无法显示