From 4fa0df37e28d88f789bb978bbb4757241fd5dceb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 27 Aug 2016 00:35:06 -0400 Subject: [PATCH] fix fields that shouldn't be required --- MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs index 6380b9f53..bf6df2347 100644 --- a/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs +++ b/MediaBrowser.XbmcMetadata/Savers/EpisodeNfoSaver.cs @@ -64,25 +64,25 @@ namespace MediaBrowser.XbmcMetadata.Savers writer.WriteElementString("aired", episode.PremiereDate.Value.ToLocalTime().ToString(formatString)); } - if (episode.AirsAfterSeasonNumber.HasValue) + if (episode.AirsAfterSeasonNumber.HasValue && episode.AirsAfterSeasonNumber.Value != -1) { writer.WriteElementString("airsafter_season", episode.AirsAfterSeasonNumber.Value.ToString(UsCulture)); } - if (episode.AirsBeforeEpisodeNumber.HasValue) + if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1) { writer.WriteElementString("airsbefore_episode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); } - if (episode.AirsBeforeEpisodeNumber.HasValue) + if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1) { writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); } - if (episode.AirsBeforeSeasonNumber.HasValue) + if (episode.AirsBeforeSeasonNumber.HasValue && episode.AirsBeforeSeasonNumber.Value != -1) { writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture)); } var season = episode.AiredSeasonNumber; - if (season.HasValue) + if (season.HasValue && season.Value != -1) { writer.WriteElementString("displayseason", season.Value.ToString(UsCulture)); }