From c1e495b21283a1f5cbaea6112f92786c60a31635 Mon Sep 17 00:00:00 2001 From: kaso17 Date: Thu, 16 Nov 2017 14:02:02 +0100 Subject: [PATCH] Hounddawgs: make grabs optional --- src/Jackett.Common/Indexers/Hounddawgs.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Jackett.Common/Indexers/Hounddawgs.cs b/src/Jackett.Common/Indexers/Hounddawgs.cs index 86e3a472a..a62ffe439 100644 --- a/src/Jackett.Common/Indexers/Hounddawgs.cs +++ b/src/Jackett.Common/Indexers/Hounddawgs.cs @@ -190,9 +190,11 @@ namespace Jackett.Indexers var sizeStr = row.ChildElements.ElementAt(5).Cq().Text(); release.Size = ReleaseInfo.GetBytes(sizeStr); - release.Grabs = ParseUtil.CoerceInt(row.ChildElements.ElementAt(6).Cq().Text()); - release.Seeders = ParseUtil.CoerceInt(row.ChildElements.ElementAt(7).Cq().Text()); - release.Peers = ParseUtil.CoerceInt(row.ChildElements.ElementAt(8).Cq().Text()) + release.Seeders; + var grabselement = row.Cq().Find("td:nth-last-child(3)"); + if (!grabselement.HasClass("nobr")) // Snatches column is optional, not all users see it (if class is nobr it's the size column) + release.Grabs = ParseUtil.CoerceInt(grabselement.Text()); + release.Seeders = ParseUtil.CoerceInt(row.Cq().Find("td:nth-last-child(2)").Text()); + release.Peers = ParseUtil.CoerceInt(row.Cq().Find("td:nth-last-child(1)").Text()) + release.Seeders; var files = row.Cq().Find("td:nth-child(4)").Text(); release.Files = ParseUtil.CoerceInt(files);