Merge pull request #241 from Radarr/patch/fix-torpotato-age

#236 #239 - Fixed user being needed & fixed age on torrentpotato
pull/244/head
Devin Buhl 8 years ago committed by GitHub
commit 3a386f2e18

@ -40,6 +40,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
torrentInfo.Seeders = torrent.seeders;
torrentInfo.Peers = torrent.leechers + torrent.seeders;
torrentInfo.Freeleech = torrent.freeleech;
torrentInfo.PublishDate = torrent.publishdate.ToUniversalTime();
results.Add(torrentInfo);
}

@ -78,9 +78,11 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
.Accept(HttpAccept.Json);
requestBuilder.AddQueryParam("passkey", Settings.Passkey);
requestBuilder.AddQueryParam("user", Settings.User);
// requestBuilder.AddQueryParam("imdbid", "tt0076759"); //For now just search for Star Wars.
requestBuilder.AddQueryParam("search", "the"); // there has to be movies with 'the' in the title on any indexer
if (!string.IsNullOrWhiteSpace(Settings.User))
{
requestBuilder.AddQueryParam("user", Settings.User);
}
requestBuilder.AddQueryParam("search", "the");
yield return new IndexerRequest(requestBuilder.Build());
}
@ -91,7 +93,11 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
.Accept(HttpAccept.Json);
requestBuilder.AddQueryParam("passkey", Settings.Passkey);
requestBuilder.AddQueryParam("user", Settings.User);
if (!string.IsNullOrWhiteSpace(Settings.User))
{
requestBuilder.AddQueryParam("user", Settings.User);
}
if (searchCriteria.Movie.ImdbId.IsNotNullOrWhiteSpace())
{

@ -21,6 +21,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
public int size { get; set; }
public int leechers { get; set; }
public int seeders { get; set; }
public DateTime publishdate { get; set; }
}
}

@ -19,7 +19,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
public TorrentPotatoSettings()
{
BaseUrl = "";
BaseUrl = "http://127.0.0.1";
}
[FieldDefinition(0, Label = "API URL", HelpText = "URL to TorrentPotato api.")]

Loading…
Cancel
Save