aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Providers/Omdb/OmdbProvider.cs23
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs4
-rw-r--r--MediaBrowser.WebDashboard/Api/DashboardService.cs1
-rw-r--r--MediaBrowser.WebDashboard/Api/PackageCreator.cs2
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj39
5 files changed, 25 insertions, 44 deletions
diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
index 67aa35710..e55321bb1 100644
--- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs
+++ b/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; }
diff --git a/MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs b/MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs
index c47332dbe..7490d62d6 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/ResponseFilter.cs
+++ b/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;
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 715f06055..5ead3b108 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/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;
diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs
index 6beb51431..11dc1c865 100644
--- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs
+++ b/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\">");
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index 1bc579d29..b369cca7d 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/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>