|
|
@ -360,6 +360,8 @@ namespace MediaBrowser.Controller.Providers.TV
|
|
|
|
string url = string.Format("http://www.thetvdb.com/api/" + TVUtils.TvdbApiKey + "/series/{0}/banners.xml", seriesId);
|
|
|
|
string url = string.Format("http://www.thetvdb.com/api/" + TVUtils.TvdbApiKey + "/series/{0}/banners.xml", seriesId);
|
|
|
|
var images = new XmlDocument();
|
|
|
|
var images = new XmlDocument();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
using (var imgs = await HttpClient.Get(new HttpRequestOptions
|
|
|
|
using (var imgs = await HttpClient.Get(new HttpRequestOptions
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Url = url,
|
|
|
|
Url = url,
|
|
|
@ -371,6 +373,18 @@ namespace MediaBrowser.Controller.Providers.TV
|
|
|
|
{
|
|
|
|
{
|
|
|
|
images.Load(imgs);
|
|
|
|
images.Load(imgs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (HttpException ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// If a series has no images this will produce a 404.
|
|
|
|
|
|
|
|
// Return gracefully so we don't keep retrying on subsequent scans
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
throw;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (images.HasChildNodes)
|
|
|
|
if (images.HasChildNodes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|