fixed duplicate image downloading

This commit is contained in:
Luke Pulverenti
2013-05-31 14:53:45 -04:00
parent caf50d0b93
commit 20d27c3bc3
4 changed files with 14 additions and 14 deletions

View File

@@ -224,7 +224,7 @@ namespace MediaBrowser.Controller.Providers.TV
return;
}
if (ConfigurationManager.Configuration.RefreshItemImages || !season.HasImage(ImageType.Primary))
if (!season.HasImage(ImageType.Primary))
{
var n = images.SelectSingleNode("//Banner[BannerType='season'][BannerType2='season'][Season='" + seasonNumber + "'][Language='" + ConfigurationManager.Configuration.PreferredMetadataLanguage + "']") ??
images.SelectSingleNode("//Banner[BannerType='season'][BannerType2='season'][Season='" + seasonNumber + "'][Language='en']");
@@ -237,7 +237,7 @@ namespace MediaBrowser.Controller.Providers.TV
}
}
if (ConfigurationManager.Configuration.DownloadSeasonImages.Banner && (ConfigurationManager.Configuration.RefreshItemImages || !season.HasImage(ImageType.Banner)))
if (ConfigurationManager.Configuration.DownloadSeasonImages.Banner && !season.HasImage(ImageType.Banner))
{
var n = images.SelectSingleNode("//Banner[BannerType='season'][BannerType2='seasonwide'][Season='" + seasonNumber + "'][Language='" + ConfigurationManager.Configuration.PreferredMetadataLanguage + "']") ??
images.SelectSingleNode("//Banner[BannerType='season'][BannerType2='seasonwide'][Season='" + seasonNumber + "'][Language='en']");
@@ -272,7 +272,7 @@ namespace MediaBrowser.Controller.Providers.TV
}
}
if (ConfigurationManager.Configuration.DownloadSeasonImages.Backdrops && (ConfigurationManager.Configuration.RefreshItemImages || season.BackdropImagePaths.Count == 0))
if (ConfigurationManager.Configuration.DownloadSeasonImages.Backdrops && season.BackdropImagePaths.Count == 0)
{
var n = images.SelectSingleNode("//Banner[BannerType='fanart'][Season='" + seasonNumber + "']");
if (n != null)

View File

@@ -226,7 +226,7 @@ namespace MediaBrowser.Controller.Providers.TV
/// <returns>Task.</returns>
private async Task FetchImages(Series series, XmlDocument images, CancellationToken cancellationToken)
{
if (ConfigurationManager.Configuration.RefreshItemImages || !series.HasImage(ImageType.Primary))
if (!series.HasImage(ImageType.Primary))
{
var n = images.SelectSingleNode("//Banner[BannerType='poster']");
if (n != null)
@@ -239,7 +239,7 @@ namespace MediaBrowser.Controller.Providers.TV
}
}
if (ConfigurationManager.Configuration.DownloadSeriesImages.Banner && (ConfigurationManager.Configuration.RefreshItemImages || !series.HasImage(ImageType.Banner)))
if (ConfigurationManager.Configuration.DownloadSeriesImages.Banner && !series.HasImage(ImageType.Banner))
{
var n = images.SelectSingleNode("//Banner[BannerType='series']");
if (n != null)