mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04: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)
|
if (doc.HasChildNodes)
|
||||||
{
|
{
|
||||||
var p = doc.SafeGetString("//filename");
|
if (!episode.HasImage(ImageType.Primary))
|
||||||
if (p != null)
|
|
||||||
{
|
{
|
||||||
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
|
try
|
||||||
{
|
{
|
||||||
episode.PrimaryImagePath = await _providerManager.DownloadAndSaveImage(episode, TVUtils.BannerUrl + p, Path.GetFileName(p), ConfigurationManager.Configuration.SaveLocalMeta, RemoteSeriesProvider.Current.TvDbResourcePool, cancellationToken);
|
episode.PrimaryImagePath = await _providerManager.DownloadAndSaveImage(episode, TVUtils.BannerUrl + p, Path.GetFileName(p), ConfigurationManager.Configuration.SaveLocalMeta, RemoteSeriesProvider.Current.TvDbResourcePool, cancellationToken);
|
||||||
}
|
}
|
||||||
catch (HttpException)
|
catch (HttpException)
|
||||||
{
|
{
|
||||||
status = ProviderRefreshStatus.CompletedWithErrors;
|
status = ProviderRefreshStatus.CompletedWithErrors;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ namespace MediaBrowser.Controller.Providers.TV
|
|||||||
series.AirTime = doc.SafeGetString("//Airs_Time");
|
series.AirTime = doc.SafeGetString("//Airs_Time");
|
||||||
|
|
||||||
string n = doc.SafeGetString("//banner");
|
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));
|
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.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Controller.Resolvers;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library
|
namespace MediaBrowser.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Resolvers;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using MediaBrowser.Controller.Resolvers;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
namespace MediaBrowser.Server.Implementations.Library.Resolvers
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user