mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
GGn Snatched + Pagination
This commit is contained in:
parent
fbf4ff6777
commit
758cae3f40
1 changed files with 15 additions and 0 deletions
|
|
@ -34,7 +34,9 @@ public class GazelleGames : TorrentIndexerBase<GazelleGamesSettings>
|
|||
public override string Language => "en-US";
|
||||
public override Encoding Encoding => Encoding.UTF8;
|
||||
public override IndexerPrivacy Privacy => IndexerPrivacy.Private;
|
||||
public override bool SupportsPagination => true;
|
||||
public override IndexerCapabilities Capabilities => SetCapabilities();
|
||||
public override TimeSpan RateLimit => TimeSpan.FromSeconds(3);
|
||||
|
||||
public GazelleGames(IIndexerHttpClient httpClient, IEventAggregator eventAggregator, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger)
|
||||
: base(httpClient, eventAggregator, indexerStatusService, configService, logger)
|
||||
|
|
@ -312,6 +314,7 @@ private List<KeyValuePair<string, string>> GetBasicSearchParameters(string searc
|
|||
{ "request", "search" },
|
||||
{ "search_type", "torrents" },
|
||||
{ "empty_groups", "filled" },
|
||||
{ "dupable", "0" },
|
||||
{ "order_by", "time" },
|
||||
{ "order_way", "desc" }
|
||||
};
|
||||
|
|
@ -357,6 +360,12 @@ private List<KeyValuePair<string, string>> GetBasicSearchParameters(string searc
|
|||
}
|
||||
}
|
||||
|
||||
if (searchCriteria.Limit is > 0 && searchCriteria.Offset is > 0)
|
||||
{
|
||||
var page = (int)(searchCriteria.Offset / searchCriteria.Limit) + 1;
|
||||
parameters.Add("page", page.ToString());
|
||||
}
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
|
|
@ -501,6 +510,11 @@ private static string GetTitle(GazelleGamesGroup group, GazelleGamesTorrent torr
|
|||
flags.Add("Trumpable");
|
||||
}
|
||||
|
||||
if (torrent.IsSnatched)
|
||||
{
|
||||
flags.Add("Snatched");
|
||||
}
|
||||
|
||||
flags = flags.Where(x => x.IsNotNullOrWhiteSpace()).ToList();
|
||||
|
||||
if (flags.Any())
|
||||
|
|
@ -614,6 +628,7 @@ public class GazelleGamesTorrent
|
|||
public string TorrentType { get; set; }
|
||||
public int FileCount { get; set; }
|
||||
public string Size { get; set; }
|
||||
public bool IsSnatched { get; set; }
|
||||
public int? Snatched { get; set; }
|
||||
public int Seeders { get; set; }
|
||||
public int Leechers { get; set; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue