瀏覽代碼

update connection manager

Luke Pulverenti 10 年之前
父節點
當前提交
3ec7ceac02

+ 3 - 3
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;

+ 5 - 0
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);

+ 1 - 8
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)
                     {