From 05ea65ede04774a3cf136c08df0f978b05cbf9b1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 26 Mar 2016 01:44:01 -0400 Subject: [PATCH] fix series nfo parsing --- .../TV/TheTVDB/TvdbSeasonImageProvider.cs | 27 ++++++++++--------- .../Parsers/SeriesNfoParser.cs | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs index 7af85ecc9..cbbfe61ac 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs @@ -88,19 +88,22 @@ namespace MediaBrowser.Providers.TV var seriesDataPath = await TvdbSeriesProvider.Current.EnsureSeriesInfo(seriesProviderIds, series.GetPreferredMetadataLanguage(), cancellationToken).ConfigureAwait(false); - var path = Path.Combine(seriesDataPath, "banners.xml"); + if (!string.IsNullOrWhiteSpace(seriesDataPath)) + { + var path = Path.Combine(seriesDataPath, "banners.xml"); - try - { - return GetImages(path, item.GetPreferredMetadataLanguage(), seasonNumber, cancellationToken); - } - catch (FileNotFoundException) - { - // No tvdb data yet. Don't blow up - } - catch (DirectoryNotFoundException) - { - // No tvdb data yet. Don't blow up + try + { + return GetImages(path, item.GetPreferredMetadataLanguage(), seasonNumber, cancellationToken); + } + catch (FileNotFoundException) + { + // No tvdb data yet. Don't blow up + } + catch (DirectoryNotFoundException) + { + // No tvdb data yet. Don't blow up + } } } diff --git a/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs index d5b5428c0..4dd2e1759 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs @@ -46,7 +46,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers } if (!string.IsNullOrWhiteSpace(tvdbId)) { - item.SetProviderId(MetadataProviders.Tvcom, tvdbId); + item.SetProviderId(MetadataProviders.Tvdb, tvdbId); } break; }