Deal with carriage return in date string (#325)

This commit is contained in:
smarshallsay 2016-04-30 12:48:52 +01:00 committed by flightlevel
parent 040deb2bfb
commit b42f2a0972
1 changed files with 4 additions and 0 deletions

View File

@ -151,6 +151,10 @@ namespace Jackett.Indexers
release.Link = new Uri(SiteLink + qRow.Find(".quickdownload > a").Attr("href").Substring(1));
var dateString = qRow.Find(".name")[0].InnerText.Trim().Replace(" ", string.Empty).Replace("Addedinon", string.Empty);
//Fix for issue 2016-04-30
dateString = dateString.Replace("\r", "").Replace("\n", "");
//"2015-04-25 23:38:12"
//"yyyy-MMM-dd hh:mm:ss"
release.PublishDate = DateTime.ParseExact(dateString, "yyyy-MM-ddHH:mm:ss", CultureInfo.InvariantCulture);