make sure omdb provider returns a name

pull/702/head
Luke Pulverenti 11 years ago
parent b52d99568b
commit 55b770ac2f

@ -295,7 +295,7 @@ namespace MediaBrowser.Providers.Manager
{
if (imageService.MergeImages(item, localItem.Images))
{
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.ImageUpdate;
}
if (!string.IsNullOrEmpty(localItem.Item.Name))

@ -149,7 +149,7 @@ namespace MediaBrowser.Providers.Movies
internal static string GetMoviesDataPath(IApplicationPaths appPaths)
{
var dataPath = Path.Combine(appPaths.DataPath, "tmdb-movies");
var dataPath = Path.Combine(appPaths.CachePath, "tmdb-movies");
return dataPath;
}

@ -69,6 +69,8 @@ namespace MediaBrowser.Providers.Omdb
{
result.Item.SetProviderId(MetadataProviders.Tvdb, searchResult.Item2);
}
result.Item.Name = searchResult.Item3;
}
if (!string.IsNullOrEmpty(imdbId))
@ -120,6 +122,8 @@ namespace MediaBrowser.Providers.Omdb
{
result.Item.SetProviderId(MetadataProviders.Tmdb, searchResult.Item2);
}
result.Item.Name = searchResult.Item3;
}
if (!string.IsNullOrEmpty(imdbId))
@ -134,26 +138,28 @@ namespace MediaBrowser.Providers.Omdb
return result;
}
private async Task<Tuple<string, string>> GetMovieImdbId(ItemLookupInfo info, CancellationToken cancellationToken)
private async Task<Tuple<string, string, string>> GetMovieImdbId(ItemLookupInfo info, CancellationToken cancellationToken)
{
var result = await new GenericMovieDbInfo<Movie>(_logger, _jsonSerializer).GetMetadata(info, cancellationToken)
.ConfigureAwait(false);
var imdb = result.HasMetadata ? result.Item.GetProviderId(MetadataProviders.Imdb) : null;
var tmdb = result.HasMetadata ? result.Item.GetProviderId(MetadataProviders.Tmdb) : null;
var name = result.HasMetadata ? result.Item.Name : null;
return new Tuple<string, string>(imdb, tmdb);
return new Tuple<string, string, string>(imdb, tmdb, name);
}
private async Task<Tuple<string,string>> GetSeriesImdbId(SeriesInfo info, CancellationToken cancellationToken)
private async Task<Tuple<string, string, string>> GetSeriesImdbId(SeriesInfo info, CancellationToken cancellationToken)
{
var result = await TvdbSeriesProvider.Current.GetMetadata(info, cancellationToken)
.ConfigureAwait(false);
var imdb = result.HasMetadata ? result.Item.GetProviderId(MetadataProviders.Imdb) : null;
var tvdb = result.HasMetadata ? result.Item.GetProviderId(MetadataProviders.Tvdb) : null;
var name = result.HasMetadata ? result.Item.Name : null;
return new Tuple<string, string>(imdb, tvdb);
return new Tuple<string, string, string>(imdb, tvdb, name);
}
public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken)

Loading…
Cancel
Save