IPTorrents: enforce Torrents - Category column == Icons

This commit is contained in:
kaso17
2018-03-12 18:24:50 +01:00
parent 0e3baba110
commit e3fc4a86a3

View File

@@ -279,8 +279,9 @@ namespace Jackett.Common.Indexers
var catIcon = row.Cq().Find("td:eq(0) a");
if (catIcon.Length >= 1) // Torrents - Category column == Icons
release.Category = MapTrackerCatToNewznab(catIcon.First().Attr("href").Substring(1));
else // Torrents - Category column == Text (Code is not supported)
release.Category = MapTrackerCatDescToNewznab(row.Cq().Find("td:eq(0)").Text());
else // Torrents - Category column == Text or Code
throw new Exception("Please go to " + SiteLink + "settings.php and change the \"Torrents - Category column\" option to \"Icons\". Wait a minute (cache) and then try again.");
//release.Category = MapTrackerCatDescToNewznab(row.Cq().Find("td:eq(0)").Text()); // Works for "Text" but only contains the parent category
var filesElement = row.Cq().Find("a[href*=\"/files\"]"); // optional
if (filesElement.Length == 1)