update connection manager

This commit is contained in:
Luke Pulverenti 2015-05-28 19:37:43 -04:00
parent b28df6a731
commit 3ec7ceac02
3 changed files with 9 additions and 11 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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)
{