mirror of https://github.com/Jackett/Jackett
TorrentBytes: Allow for missing category and fix time
TorrentBytes: Allow for missing category and fix time
This commit is contained in:
parent
2901cceea9
commit
e57cbe3b44
|
@ -152,15 +152,18 @@ namespace Jackett.Indexers
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cat = row.Cq().Find("td:eq(0) a").First().Attr("href").Substring(15);
|
// Check if the release has been assigned a category
|
||||||
release.Category = MapTrackerCatToNewznab(cat);
|
if (row.Cq().Find("td:eq(0) a").Length > 0)
|
||||||
|
{
|
||||||
|
var cat = row.Cq().Find("td:eq(0) a").First().Attr("href").Substring(15);
|
||||||
|
release.Category = MapTrackerCatToNewznab(cat);
|
||||||
|
}
|
||||||
|
|
||||||
var qLink = row.Cq().Find("td:eq(1) a").First();
|
var qLink = row.Cq().Find("td:eq(1) a").First();
|
||||||
release.Link = new Uri(SiteLink + qLink.Attr("href"));
|
release.Link = new Uri(SiteLink + qLink.Attr("href"));
|
||||||
|
|
||||||
var added = row.Cq().Find("td:eq(4)").First().Text().Trim();
|
var added = row.Cq().Find("td:eq(4)").First().Text().Trim();
|
||||||
release.PublishDate = DateTimeUtil.FromTimeAgo(added);
|
release.PublishDate = DateTime.ParseExact(added, "yyyy-MM-ddHH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal).ToLocalTime();
|
||||||
|
|
||||||
var sizeStr = row.Cq().Find("td:eq(6)").First().Text().Trim();
|
var sizeStr = row.Cq().Find("td:eq(6)").First().Text().Trim();
|
||||||
release.Size = ReleaseInfo.GetBytes(sizeStr);
|
release.Size = ReleaseInfo.GetBytes(sizeStr);
|
||||||
|
|
Loading…
Reference in New Issue