make sure series and episode providers are checking for existence of images

pull/702/head
Luke Pulverenti 12 years ago
parent 9430b09ae9
commit 466d00b021

@ -214,6 +214,8 @@ namespace MediaBrowser.Controller.Providers.TV
} }
if (doc.HasChildNodes) if (doc.HasChildNodes)
{
if (!episode.HasImage(ImageType.Primary))
{ {
var p = doc.SafeGetString("//filename"); var p = doc.SafeGetString("//filename");
if (p != null) if (p != null)
@ -229,6 +231,7 @@ namespace MediaBrowser.Controller.Providers.TV
status = ProviderRefreshStatus.CompletedWithErrors; status = ProviderRefreshStatus.CompletedWithErrors;
} }
} }
}
episode.Overview = doc.SafeGetString("//Overview"); episode.Overview = doc.SafeGetString("//Overview");
if (usingAbsoluteData) if (usingAbsoluteData)

@ -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…
Cancel
Save