From df65ee2e49a8c2dd51ff0f555db16d82c50ab3fe Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 1 Nov 2013 16:34:26 -0400 Subject: [PATCH] #606 - Add manual image selection for Seasons --- .../Movies/ManualFanartMovieImageProvider.cs | 8 ++++++-- .../TV/ManualFanartSeasonProvider.cs | 14 +++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.Providers/Movies/ManualFanartMovieImageProvider.cs b/MediaBrowser.Providers/Movies/ManualFanartMovieImageProvider.cs index 64843de99..d714128ea 100644 --- a/MediaBrowser.Providers/Movies/ManualFanartMovieImageProvider.cs +++ b/MediaBrowser.Providers/Movies/ManualFanartMovieImageProvider.cs @@ -225,8 +225,12 @@ namespace MediaBrowser.Providers.Movies break; } default: - reader.Skip(); - break; + { + using (reader.ReadSubtree()) + { + } + break; + } } } } diff --git a/MediaBrowser.Providers/TV/ManualFanartSeasonProvider.cs b/MediaBrowser.Providers/TV/ManualFanartSeasonProvider.cs index d1d172699..b66d9faf5 100644 --- a/MediaBrowser.Providers/TV/ManualFanartSeasonProvider.cs +++ b/MediaBrowser.Providers/TV/ManualFanartSeasonProvider.cs @@ -53,7 +53,7 @@ namespace MediaBrowser.Providers.TV { var list = new List(); - var series = ((Season) item).Series; + var series = ((Season)item).Series; if (series != null) { @@ -175,8 +175,12 @@ namespace MediaBrowser.Providers.TV break; } default: - reader.Skip(); - break; + { + using (reader.ReadSubtree()) + { + } + break; + } } } } @@ -202,8 +206,8 @@ namespace MediaBrowser.Providers.TV int imageSeasonNumber; - if (!string.IsNullOrEmpty(url) && - !string.IsNullOrEmpty(season) && + if (!string.IsNullOrEmpty(url) && + !string.IsNullOrEmpty(season) && int.TryParse(season, NumberStyles.Any, _usCulture, out imageSeasonNumber) && seasonNumber == imageSeasonNumber) {