mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
cleanup duplicate image downloading
This commit is contained in:
parent
8c403a4dc8
commit
5d4bea674f
@ -268,7 +268,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConfigurationManager.Configuration.DownloadMovieImages.Backdrops && item.BackdropImagePaths.Count < ConfigurationManager.Configuration.MaxBackdrops)
|
if (ConfigurationManager.Configuration.DownloadMovieImages.Backdrops && item.BackdropImagePaths.Count == 0)
|
||||||
{
|
{
|
||||||
var nodes = doc.SelectNodes("//fanart/series/showbackgrounds//@url");
|
var nodes = doc.SelectNodes("//fanart/series/showbackgrounds//@url");
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||||||
}
|
}
|
||||||
|
|
||||||
data.Data = GetComparisonData(imagesFileInfo);
|
data.Data = GetComparisonData(imagesFileInfo);
|
||||||
|
|
||||||
SetLastRefreshed(item, DateTime.UtcNow);
|
SetLastRefreshed(item, DateTime.UtcNow);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fetches the images.
|
/// Fetches the images.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -234,7 +234,9 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||||||
n = n.SelectSingleNode("./BannerPath");
|
n = n.SelectSingleNode("./BannerPath");
|
||||||
if (n != null)
|
if (n != null)
|
||||||
{
|
{
|
||||||
series.PrimaryImagePath = await _providerManager.DownloadAndSaveImage(series, TVUtils.BannerUrl + n.InnerText, "folder" + Path.GetExtension(n.InnerText), ConfigurationManager.Configuration.SaveLocalMeta, RemoteSeriesProvider.Current.TvDbResourcePool, cancellationToken).ConfigureAwait(false);
|
var path = await _providerManager.DownloadAndSaveImage(series, TVUtils.BannerUrl + n.InnerText, "folder" + Path.GetExtension(n.InnerText), ConfigurationManager.Configuration.SaveLocalMeta, RemoteSeriesProvider.Current.TvDbResourcePool, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
series.SetImage(ImageType.Primary, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,7 +256,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (series.BackdropImagePaths.Count < ConfigurationManager.Configuration.MaxBackdrops)
|
if (series.BackdropImagePaths.Count == 0)
|
||||||
{
|
{
|
||||||
var bdNo = series.BackdropImagePaths.Count;
|
var bdNo = series.BackdropImagePaths.Count;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user