check tmdb id in fanart provider
This commit is contained in:
parent
9367878dcb
commit
d124083f15
|
@ -229,28 +229,23 @@ namespace MediaBrowser.Providers.Movies
|
||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
BaseProviderInfo data;
|
|
||||||
|
|
||||||
if (!item.ProviderData.TryGetValue(Id, out data))
|
|
||||||
{
|
|
||||||
data = new BaseProviderInfo();
|
|
||||||
item.ProviderData[Id] = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
var movieId = item.GetProviderId(MetadataProviders.Tmdb);
|
var movieId = item.GetProviderId(MetadataProviders.Tmdb);
|
||||||
|
|
||||||
var movieDataPath = GetMovieDataPath(ConfigurationManager.ApplicationPaths, movieId);
|
if (!string.IsNullOrEmpty(movieId))
|
||||||
var xmlPath = Path.Combine(movieDataPath, "fanart.xml");
|
|
||||||
|
|
||||||
// Only download the xml if it doesn't already exist. The prescan task will take care of getting updates
|
|
||||||
if (!File.Exists(xmlPath))
|
|
||||||
{
|
{
|
||||||
await DownloadMovieXml(movieDataPath, movieId, cancellationToken).ConfigureAwait(false);
|
var movieDataPath = GetMovieDataPath(ConfigurationManager.ApplicationPaths, movieId);
|
||||||
}
|
var xmlPath = Path.Combine(movieDataPath, "fanart.xml");
|
||||||
|
|
||||||
if (File.Exists(xmlPath))
|
// Only download the xml if it doesn't already exist. The prescan task will take care of getting updates
|
||||||
{
|
if (!File.Exists(xmlPath))
|
||||||
await FetchFromXml(item, xmlPath, cancellationToken).ConfigureAwait(false);
|
{
|
||||||
|
await DownloadMovieXml(movieDataPath, movieId, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (File.Exists(xmlPath))
|
||||||
|
{
|
||||||
|
await FetchFromXml(item, xmlPath, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetLastRefreshed(item, DateTime.UtcNow);
|
SetLastRefreshed(item, DateTime.UtcNow);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user