From 3ec7ceac0282e21219b6a8da858375e82700c595 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 28 May 2015 19:37:43 -0400 Subject: [PATCH] update connection manager --- MediaBrowser.Providers/Omdb/OmdbItemProvider.cs | 6 +++--- MediaBrowser.Providers/Omdb/OmdbProvider.cs | 5 +++++ MediaBrowser.WebDashboard/Api/PackageCreator.cs | 9 +-------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs b/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs index 859a8e8e29..1ee2d86de7 100644 --- a/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs @@ -165,7 +165,7 @@ namespace MediaBrowser.Providers.Omdb var imdbId = result.Item.GetProviderId(MetadataProviders.Imdb); - if (!string.IsNullOrEmpty(info.GetProviderId(MetadataProviders.Imdb))) + if (!string.IsNullOrEmpty(imdbId)) { result.Item.SetProviderId(MetadataProviders.Imdb, imdbId); result.HasMetadata = true; @@ -195,7 +195,7 @@ namespace MediaBrowser.Providers.Omdb var searchResult = await GetMovieImdbId(info, cancellationToken).ConfigureAwait(false); result.Item.Name = searchResult.Item3; - if (string.IsNullOrEmpty(imdbId)) + if (string.IsNullOrWhiteSpace(imdbId)) { imdbId = searchResult.Item1; @@ -205,7 +205,7 @@ namespace MediaBrowser.Providers.Omdb } } - if (!string.IsNullOrEmpty(imdbId)) + if (!string.IsNullOrWhiteSpace(imdbId)) { result.Item.SetProviderId(MetadataProviders.Imdb, imdbId); result.HasMetadata = true; diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs index 2d6c0e3d72..67aa35710a 100644 --- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs @@ -29,6 +29,11 @@ namespace MediaBrowser.Providers.Omdb public async Task Fetch(BaseItem item, string imdbId, CancellationToken cancellationToken) { + if (string.IsNullOrWhiteSpace(imdbId)) + { + throw new ArgumentNullException("imdbId"); + } + var imdbParam = imdbId.StartsWith("tt", StringComparison.OrdinalIgnoreCase) ? imdbId : "tt" + imdbId; var url = string.Format("http://www.omdbapi.com/?i={0}&tomatoes=true", imdbParam); diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index 15aed68193..a2afaaa7a8 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -59,14 +59,7 @@ namespace MediaBrowser.WebDashboard.Api { // Don't apply any caching for html pages // jQuery ajax doesn't seem to handle if-modified-since correctly - if (IsFormat(path, "html")) - { - if (path.IndexOf("cordovaindex.html", StringComparison.OrdinalIgnoreCase) == -1) - { - resourceStream = await ModifyHtml(resourceStream, mode, localizationCulture, enableMinification).ConfigureAwait(false); - } - } - else if (IsFormat(path, "js")) + if (IsFormat(path, "js")) { if (path.IndexOf("thirdparty", StringComparison.OrdinalIgnoreCase) == -1) {