diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs index 2c21e408ef..fdaf7bb9de 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoParser.cs @@ -40,6 +40,7 @@ public IList 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); } diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs index f85969d1e1..b9856250b8 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoRequestGenerator.cs @@ -78,9 +78,11 @@ private IEnumerable 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 + if (!string.IsNullOrWhiteSpace(Settings.User)) + { + requestBuilder.AddQueryParam("user", Settings.User); + } + requestBuilder.AddQueryParam("search", "the"); yield return new IndexerRequest(requestBuilder.Build()); } @@ -91,7 +93,11 @@ private IEnumerable GetMovieRequest(MovieSearchCriteria searchCr .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()) { diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoResponse.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoResponse.cs index 9b83004050..b0551ca67b 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoResponse.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoResponse.cs @@ -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; } } } diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs index d0b902f5ef..14c91e2d07 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs @@ -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.")]