From 1cc77fcacbae2edb547408322d18b09b822bf306 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 20 Feb 2021 02:43:14 -0500 Subject: [PATCH] Parse Grabs for Gazelle Indexers --- src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleApi.cs | 4 ++-- .../Indexers/Definitions/Gazelle/GazelleParser.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleApi.cs b/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleApi.cs index 18a26dcce..9dd0e8930 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleApi.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleApi.cs @@ -29,7 +29,7 @@ namespace NzbDrone.Core.Indexers.Gazelle public int FileCount { get; set; } public DateTime Time { get; set; } public string Size { get; set; } - public string Snatches { get; set; } + public int? Snatches { get; set; } public string Seeders { get; set; } public string Leechers { get; set; } public string Category { get; set; } @@ -46,7 +46,7 @@ namespace NzbDrone.Core.Indexers.Gazelle public int TorrentId { get; set; } public string Size { get; set; } public int FileCount { get; set; } - public string Snatches { get; set; } + public int? Snatches { get; set; } public string Seeders { get; set; } public string Leechers { get; set; } public string Category { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleParser.cs b/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleParser.cs index bd2ab041a..ec14a6338 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Gazelle/GazelleParser.cs @@ -74,6 +74,7 @@ namespace NzbDrone.Core.Indexers.Gazelle Title = WebUtility.HtmlDecode(title), Container = torrent.Encoding, Files = torrent.FileCount, + Grabs = torrent.Snatches, Codec = torrent.Format, Size = long.Parse(torrent.Size), DownloadUrl = GetDownloadUrl(id), @@ -112,6 +113,7 @@ namespace NzbDrone.Core.Indexers.Gazelle Seeders = int.Parse(result.Seeders), Peers = int.Parse(result.Leechers) + int.Parse(result.Seeders), Files = result.FileCount, + Grabs = result.Snatches, PublishDate = DateTimeOffset.FromUnixTimeSeconds(result.GroupTime).UtcDateTime, };