Fixed: Parsing of daily episodes with bad date format (YYYY/DD/MM) instead of (YYYY/MM/DD)

This commit is contained in:
kay.one 2012-02-23 23:31:15 -08:00
commit 96317b476c
2 changed files with 13 additions and 0 deletions

View file

@ -192,8 +192,17 @@ namespace NzbDrone.Core
var airmonth = Convert.ToInt32(matchCollection[0].Groups["airmonth"].Value);
var airday = Convert.ToInt32(matchCollection[0].Groups["airday"].Value);
//Swap day and month if month is bigger than 12 (scene fail)
if (airmonth > 12)
{
var tempDay = airday;
airday = airmonth;
airmonth = tempDay;
}
parsedEpisode = new EpisodeParseResult
{
AirDate = new DateTime(airyear, airmonth, airday).Date,
};
}