diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-26 01:44:01 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-26 01:44:01 -0400 |
| commit | 05ea65ede04774a3cf136c08df0f978b05cbf9b1 (patch) | |
| tree | aad65665b179834fb3e9b601eb07a9612034655c /MediaBrowser.Providers | |
| parent | a43f4a4666735f34951dfc0c56e56ca216bec475 (diff) | |
fix series nfo parsing
Diffstat (limited to 'MediaBrowser.Providers')
| -rw-r--r-- | MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs index 7af85ecc93..cbbfe61ac9 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"); - - try - { - return GetImages(path, item.GetPreferredMetadataLanguage(), seasonNumber, cancellationToken); - } - catch (FileNotFoundException) + if (!string.IsNullOrWhiteSpace(seriesDataPath)) { - // No tvdb data yet. Don't blow up - } - catch (DirectoryNotFoundException) - { - // No tvdb data yet. Don't blow up + 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 + } } } |
