DigitalHive: fix date parsing for completed torrents

This commit is contained in:
kaso17 2017-04-20 17:40:54 +02:00
parent e1afea35b7
commit 2e7f2056c4
1 changed files with 3 additions and 1 deletions

View File

@ -205,7 +205,9 @@ namespace Jackett.Indexers
release.Guid = new Uri(SiteLink + qRow.Find("td:nth-child(2) > a").First().Attr("href"));
release.Comments = release.Guid;
release.Link = new Uri(SiteLink + qRow.Find("td:nth-child(3) > a").First().Attr("href"));
var pubDate = new StringReader(qRow.Find("td:nth-child(2) > span").First().Text()).ReadLine().Trim().Replace("Added: ", "");
var pubDateElement = qRow.Find("td:nth-child(2) > span").First();
pubDateElement.Find("a").Remove(); // remove snatchinfo links (added after completing a torrent)
var pubDate = pubDateElement.Text().Trim().Replace("Added: ", "");
release.PublishDate = DateTime.Parse(pubDate).ToLocalTime();
release.Category = MapTrackerCatToNewznab(qRow.Find("td:nth-child(1) > a").First().Attr("href").Split('=')[1]);
release.Size = ReleaseInfo.GetBytes(qRow.Find("td:nth-child(7)").First().Text());