update episode nfo saving

This commit is contained in:
Luke Pulverenti 2016-09-18 13:29:52 -04:00
parent be491f7321
commit 2023855a1f

View File

@ -64,6 +64,8 @@ namespace MediaBrowser.XbmcMetadata.Savers
writer.WriteElementString("aired", episode.PremiereDate.Value.ToLocalTime().ToString(formatString)); writer.WriteElementString("aired", episode.PremiereDate.Value.ToLocalTime().ToString(formatString));
} }
if (!episode.ParentIndexNumber.HasValue || episode.ParentIndexNumber.Value == 0)
{
if (episode.AirsAfterSeasonNumber.HasValue && episode.AirsAfterSeasonNumber.Value != -1) if (episode.AirsAfterSeasonNumber.HasValue && episode.AirsAfterSeasonNumber.Value != -1)
{ {
writer.WriteElementString("airsafter_season", episode.AirsAfterSeasonNumber.Value.ToString(UsCulture)); writer.WriteElementString("airsafter_season", episode.AirsAfterSeasonNumber.Value.ToString(UsCulture));
@ -77,8 +79,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture)); writer.WriteElementString("airsbefore_season", episode.AirsBeforeSeasonNumber.Value.ToString(UsCulture));
} }
if (episode.ParentIndexNumber.HasValue && episode.ParentIndexNumber.Value == 0)
{
if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1) if (episode.AirsBeforeEpisodeNumber.HasValue && episode.AirsBeforeEpisodeNumber.Value != -1)
{ {
writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture)); writer.WriteElementString("displayepisode", episode.AirsBeforeEpisodeNumber.Value.ToString(UsCulture));