1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 01:38:24 +00:00

#236 #239 - Fixed user being needed, fixed age on torrentpotato

This commit is contained in:
Devin Buhl 2017-01-13 16:12:49 -05:00
parent f7471940c4
commit 3180e648b4
4 changed files with 6 additions and 5 deletions

View file

@ -40,6 +40,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
torrentInfo.Seeders = torrent.seeders;
torrentInfo.Peers = torrent.leechers + torrent.seeders;
torrentInfo.Freeleech = torrent.freeleech;
torrentInfo.PublishDate = torrent.publishdate.ToUniversalTime();
results.Add(torrentInfo);
}

View file

@ -78,9 +78,8 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string mode, int? tvdbId, s
.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
requestBuilder.AddQueryParam("user", !string.IsNullOrWhiteSpace(Settings.User) ? Settings.User : "");
requestBuilder.AddQueryParam("search", "the");
yield return new IndexerRequest(requestBuilder.Build());
}
@ -91,7 +90,7 @@ private IEnumerable<IndexerRequest> GetMovieRequest(MovieSearchCriteria searchCr
.Accept(HttpAccept.Json);
requestBuilder.AddQueryParam("passkey", Settings.Passkey);
requestBuilder.AddQueryParam("user", Settings.User);
requestBuilder.AddQueryParam("user", !string.IsNullOrWhiteSpace(Settings.User) ? Settings.User : "");
if (searchCriteria.Movie.ImdbId.IsNotNullOrWhiteSpace())
{

View file

@ -21,6 +21,7 @@ public class Result
public int size { get; set; }
public int leechers { get; set; }
public int seeders { get; set; }
public DateTime publishdate { get; set; }
}
}

View file

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