Kaynağa Gözat

fix web project

Luke Pulverenti 10 yıl önce
ebeveyn
işleme
a93045c01a

+ 22 - 1
MediaBrowser.Providers/Omdb/OmdbProvider.cs

@@ -1,5 +1,6 @@
 using MediaBrowser.Common.Net;
 using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Entities;
 using MediaBrowser.Model.Serialization;
 using System;
 using System.Globalization;
@@ -50,6 +51,20 @@ namespace MediaBrowser.Providers.Omdb
             {
                 var result = _jsonSerializer.DeserializeFromStream<RootObject>(stream);
 
+                item.Name = result.Title;
+
+                int year;
+
+                if (!string.IsNullOrEmpty(result.Year)
+                    && int.TryParse(result.Year, NumberStyles.Number, _usCulture, out year)
+                    && year >= 0)
+                {
+                    item.ProductionYear = year;
+                }
+
+                item.OfficialRating = result.Rated;
+
+
                 var hasCriticRating = item as IHasCriticRating;
                 if (hasCriticRating != null)
                 {
@@ -96,6 +111,12 @@ namespace MediaBrowser.Providers.Omdb
                     item.HomePageUrl = result.Website;
                 }
 
+                if (!string.IsNullOrWhiteSpace(result.imdbID)
+                        && !string.Equals(result.imdbID, "n/a", StringComparison.OrdinalIgnoreCase))
+                {
+                    item.SetProviderId(MetadataProviders.Imdb, result.imdbID);
+                }
+
                 ParseAdditionalMetadata(item, result);
             }
         }
@@ -153,7 +174,7 @@ namespace MediaBrowser.Providers.Omdb
             return string.Equals(lang, "en", StringComparison.OrdinalIgnoreCase);
         }
 
-        public class RootObject
+        private class RootObject
         {
             public string Title { get; set; }
             public string Year { get; set; }

+ 2 - 2
MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs

@@ -1,6 +1,5 @@
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Server.Implementations.HttpServer.SocketSharp;
-using ServiceStack;
 using ServiceStack.Web;
 using System;
 using System.Globalization;
@@ -29,6 +28,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
         {
             // Try to prevent compatibility view
             res.AddHeader("X-UA-Compatible", "IE=Edge");
+            res.AddHeader("X-Frame-Options", "DENY");
 
             var exception = dto as Exception;
 
@@ -52,7 +52,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
 
             if (hasOptions != null)
             {
-                //hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1";
+                hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1";
 
                 // Content length has to be explicitly set on on HttpListenerResponse or it won't be happy
                 string contentLength;

+ 0 - 1
MediaBrowser.WebDashboard/Api/DashboardService.cs

@@ -13,7 +13,6 @@ using ServiceStack;
 using ServiceStack.Web;
 using System;
 using System.Collections.Generic;
-using System.Globalization;
 using System.IO;
 using System.Linq;
 using System.Threading.Tasks;

+ 1 - 1
MediaBrowser.WebDashboard/Api/PackageCreator.cs

@@ -336,7 +336,7 @@ namespace MediaBrowser.WebDashboard.Api
             sb.Append("<meta http-equiv=\"X-UA-Compatibility\" content=\"IE=Edge\">");
             sb.Append("<meta name=\"format-detection\" content=\"telephone=no\">");
             sb.Append("<meta name=\"msapplication-tap-highlight\" content=\"no\">");
-            sb.Append("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no\">");
+            sb.Append("<meta name=\"viewport\" content=\"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, target-densitydpi=device-dpi\">");
             sb.Append("<meta name=\"apple-mobile-web-app-capable\" content=\"yes\">");
             sb.Append("<meta name=\"mobile-web-app-capable\" content=\"yes\">");
             sb.Append("<meta name=\"application-name\" content=\"Emby\">");

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

@@ -314,45 +314,6 @@
     <Content Include="dashboard-ui\css\icons.css">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_disabled_holo_dark.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_disabled_holo_light.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_off_holo_dark.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_off_holo_light.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_0_holo_dark.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_0_holo_light.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_1_holo_dark.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_1_holo_light.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_2_holo_dark.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_2_holo_light.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_holo_dark.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_media_route_on_holo_light.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="dashboard-ui\css\images\chromecast\ic_notification_media_route.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
     <Content Include="dashboard-ui\css\images\clients\amazon.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>