From f9a2da83b263284d3cff5b36af3f10a46bd0c31b Mon Sep 17 00:00:00 2001 From: flightlevel Date: Tue, 11 Apr 2017 20:51:14 +1000 Subject: [PATCH] Digitalhive (#1272) * Attempt to fix DigitalHive Date Parsing * Add reference --- src/Jackett/Indexers/DigitalHive.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Jackett/Indexers/DigitalHive.cs b/src/Jackett/Indexers/DigitalHive.cs index 5d8c1d6a8..570925c44 100644 --- a/src/Jackett/Indexers/DigitalHive.cs +++ b/src/Jackett/Indexers/DigitalHive.cs @@ -13,6 +13,7 @@ using System.Threading.Tasks; using Jackett.Models.IndexerConfig; using System.Collections.Specialized; using System.Text.RegularExpressions; +using System.IO; namespace Jackett.Indexers { @@ -204,7 +205,7 @@ 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 = qRow.Find("td:nth-child(2) > span").First().Text().Trim().Replace("Added: ", ""); + var pubDate = new StringReader(qRow.Find("td:nth-child(2) > span").First().Text()).ReadLine().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());