fixes #591 - Support new fanart movie posters
This commit is contained in:
parent
e9f0ff15a3
commit
62621bf97b
|
@ -141,12 +141,14 @@ namespace MediaBrowser.Providers.Movies
|
||||||
!ConfigurationManager.Configuration.DownloadMovieImages.Disc &&
|
!ConfigurationManager.Configuration.DownloadMovieImages.Disc &&
|
||||||
!ConfigurationManager.Configuration.DownloadMovieImages.Backdrops &&
|
!ConfigurationManager.Configuration.DownloadMovieImages.Backdrops &&
|
||||||
!ConfigurationManager.Configuration.DownloadMovieImages.Banner &&
|
!ConfigurationManager.Configuration.DownloadMovieImages.Banner &&
|
||||||
!ConfigurationManager.Configuration.DownloadMovieImages.Thumb)
|
!ConfigurationManager.Configuration.DownloadMovieImages.Thumb &&
|
||||||
|
!ConfigurationManager.Configuration.DownloadMovieImages.Primary)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.HasImage(ImageType.Art) &&
|
if (item.HasImage(ImageType.Primary) &&
|
||||||
|
item.HasImage(ImageType.Art) &&
|
||||||
item.HasImage(ImageType.Logo) &&
|
item.HasImage(ImageType.Logo) &&
|
||||||
item.HasImage(ImageType.Disc) &&
|
item.HasImage(ImageType.Disc) &&
|
||||||
item.HasImage(ImageType.Banner) &&
|
item.HasImage(ImageType.Banner) &&
|
||||||
|
@ -298,6 +300,20 @@ namespace MediaBrowser.Providers.Movies
|
||||||
|
|
||||||
string path;
|
string path;
|
||||||
|
|
||||||
|
if (ConfigurationManager.Configuration.DownloadMovieImages.Disc && !item.HasImage(ImageType.Disc))
|
||||||
|
{
|
||||||
|
var node = doc.SelectSingleNode("//fanart/movie/movieposters/movieposter[@lang = \"" + language + "\"]/@url") ??
|
||||||
|
doc.SelectSingleNode("//fanart/movie/movieposters/movieposter/@url");
|
||||||
|
path = node != null ? node.Value : null;
|
||||||
|
if (!string.IsNullOrEmpty(path))
|
||||||
|
{
|
||||||
|
await _providerManager.SaveImage(item, path, FanArtResourcePool, ImageType.Disc, null, cancellationToken)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
if (ConfigurationManager.Configuration.DownloadMovieImages.Logo && !item.HasImage(ImageType.Logo))
|
if (ConfigurationManager.Configuration.DownloadMovieImages.Logo && !item.HasImage(ImageType.Logo))
|
||||||
{
|
{
|
||||||
var node =
|
var node =
|
||||||
|
|
|
@ -126,6 +126,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
catch (DirectoryNotFoundException)
|
catch (DirectoryNotFoundException)
|
||||||
{
|
{
|
||||||
// Don't blow up
|
// Don't blow up
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user