Parse Grabs for Gazelle Indexers

pull/8/head
Qstick 4 years ago
parent 90abcee120
commit 1cc77fcacb

@ -29,7 +29,7 @@ namespace NzbDrone.Core.Indexers.Gazelle
public int FileCount { get; set; } public int FileCount { get; set; }
public DateTime Time { get; set; } public DateTime Time { get; set; }
public string Size { get; set; } public string Size { get; set; }
public string Snatches { get; set; } public int? Snatches { get; set; }
public string Seeders { get; set; } public string Seeders { get; set; }
public string Leechers { get; set; } public string Leechers { get; set; }
public string Category { get; set; } public string Category { get; set; }
@ -46,7 +46,7 @@ namespace NzbDrone.Core.Indexers.Gazelle
public int TorrentId { get; set; } public int TorrentId { get; set; }
public string Size { get; set; } public string Size { get; set; }
public int FileCount { get; set; } public int FileCount { get; set; }
public string Snatches { get; set; } public int? Snatches { get; set; }
public string Seeders { get; set; } public string Seeders { get; set; }
public string Leechers { get; set; } public string Leechers { get; set; }
public string Category { get; set; } public string Category { get; set; }

@ -74,6 +74,7 @@ namespace NzbDrone.Core.Indexers.Gazelle
Title = WebUtility.HtmlDecode(title), Title = WebUtility.HtmlDecode(title),
Container = torrent.Encoding, Container = torrent.Encoding,
Files = torrent.FileCount, Files = torrent.FileCount,
Grabs = torrent.Snatches,
Codec = torrent.Format, Codec = torrent.Format,
Size = long.Parse(torrent.Size), Size = long.Parse(torrent.Size),
DownloadUrl = GetDownloadUrl(id), DownloadUrl = GetDownloadUrl(id),
@ -112,6 +113,7 @@ namespace NzbDrone.Core.Indexers.Gazelle
Seeders = int.Parse(result.Seeders), Seeders = int.Parse(result.Seeders),
Peers = int.Parse(result.Leechers) + int.Parse(result.Seeders), Peers = int.Parse(result.Leechers) + int.Parse(result.Seeders),
Files = result.FileCount, Files = result.FileCount,
Grabs = result.Snatches,
PublishDate = DateTimeOffset.FromUnixTimeSeconds(result.GroupTime).UtcDateTime, PublishDate = DateTimeOffset.FromUnixTimeSeconds(result.GroupTime).UtcDateTime,
}; };

Loading…
Cancel
Save