mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
make sure series and episode providers are checking for existence of images
This commit is contained in:
parent
9430b09ae9
commit
466d00b021
@ -215,18 +215,21 @@ namespace MediaBrowser.Controller.Providers.TV
|
||||
|
||||
if (doc.HasChildNodes)
|
||||
{
|
||||
var p = doc.SafeGetString("//filename");
|
||||
if (p != null)
|
||||
if (!episode.HasImage(ImageType.Primary))
|
||||
{
|
||||
if (!Directory.Exists(episode.MetaLocation)) Directory.CreateDirectory(episode.MetaLocation);
|
||||
var p = doc.SafeGetString("//filename");
|
||||
if (p != null)
|
||||
{
|
||||
if (!Directory.Exists(episode.MetaLocation)) Directory.CreateDirectory(episode.MetaLocation);
|
||||
|
||||
try
|
||||
{
|
||||
episode.PrimaryImagePath = await _providerManager.DownloadAndSaveImage(episode, TVUtils.BannerUrl + p, Path.GetFileName(p), ConfigurationManager.Configuration.SaveLocalMeta, RemoteSeriesProvider.Current.TvDbResourcePool, cancellationToken);
|
||||
}
|
||||
catch (HttpException)
|
||||
{
|
||||
status = ProviderRefreshStatus.CompletedWithErrors;
|
||||
try
|
||||
{
|
||||
episode.PrimaryImagePath = await _providerManager.DownloadAndSaveImage(episode, TVUtils.BannerUrl + p, Path.GetFileName(p), ConfigurationManager.Configuration.SaveLocalMeta, RemoteSeriesProvider.Current.TvDbResourcePool, cancellationToken);
|
||||
}
|
||||
catch (HttpException)
|
||||
{
|
||||
status = ProviderRefreshStatus.CompletedWithErrors;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
||||
series.AirTime = doc.SafeGetString("//Airs_Time");
|
||||
|
||||
string n = doc.SafeGetString("//banner");
|
||||
if (!string.IsNullOrWhiteSpace(n))
|
||||
if (!string.IsNullOrWhiteSpace(n) && !series.HasImage(ImageType.Banner))
|
||||
{
|
||||
series.SetImage(ImageType.Banner, await _providerManager.DownloadAndSaveImage(series, TVUtils.BannerUrl + n, "banner" + Path.GetExtension(n), ConfigurationManager.Configuration.SaveLocalMeta, TvDbResourcePool, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
using System.IO;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Resolvers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Controller.Resolvers;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Library
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Resolvers;
|
||||
using System;
|
||||
using System.IO;
|
||||
using MediaBrowser.Controller.Resolvers;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user