mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-08 21:14:30 +02:00
Fixed: (GGn) Improve titles and allow only torrents
This commit is contained in:
parent
86124d4319
commit
850315ad1c
1 changed files with 15 additions and 1 deletions
|
|
@ -394,7 +394,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
|
||||
var torrents = groupTorrents
|
||||
.ToObject<Dictionary<int, GazelleGamesTorrent>>(JsonSerializer.Create(Json.GetSerializerSettings()))
|
||||
.Where(t => t.Value.TorrentType != "Link")
|
||||
.Where(t => t.Value.TorrentType.ToUpperInvariant() == "TORRENT")
|
||||
.ToList();
|
||||
|
||||
var categories = group.Value.Artists
|
||||
|
|
@ -470,6 +470,11 @@ private static string GetTitle(GazelleGamesGroup group, GazelleGamesTorrent torr
|
|||
flags.AddIfNotNull(torrent.Region);
|
||||
flags.AddIfNotNull(torrent.Miscellaneous);
|
||||
|
||||
if (torrent.Dupable == 1)
|
||||
{
|
||||
flags.Add("Trumpable");
|
||||
}
|
||||
|
||||
flags = flags.Where(x => x.IsNotNullOrWhiteSpace()).ToList();
|
||||
|
||||
if (flags.Any())
|
||||
|
|
@ -477,6 +482,11 @@ private static string GetTitle(GazelleGamesGroup group, GazelleGamesTorrent torr
|
|||
title += $" [{string.Join(" / ", flags)}]";
|
||||
}
|
||||
|
||||
if (torrent.GameDoxType.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
title += $" [{torrent.GameDoxType.Trim()}]";
|
||||
}
|
||||
|
||||
return title;
|
||||
}
|
||||
|
||||
|
|
@ -570,6 +580,7 @@ public class GazelleGamesTorrent
|
|||
public string ReleaseTitle { get; set; }
|
||||
public string Miscellaneous { get; set; }
|
||||
public int Scene { get; set; }
|
||||
public int Dupable { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
public string TorrentType { get; set; }
|
||||
public int FileCount { get; set; }
|
||||
|
|
@ -580,6 +591,9 @@ public class GazelleGamesTorrent
|
|||
public GazelleGamesFreeTorrent FreeTorrent { get; set; }
|
||||
public bool PersonalFL { get; set; }
|
||||
public bool LowSeedFL { get; set; }
|
||||
|
||||
[JsonProperty("GameDOXType")]
|
||||
public string GameDoxType { get; set; }
|
||||
}
|
||||
|
||||
public class GazelleGamesUserResponse
|
||||
|
|
|
|||
Loading…
Reference in a new issue