diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs index b9e20d678..4ee35349e 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotato.cs @@ -1,15 +1,14 @@ using System; using NLog; -using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Messaging.Events; -namespace NzbDrone.Core.Indexers.TorrentPotato +namespace NzbDrone.Core.Indexers.Definitions.TorrentPotato { public class TorrentPotato : TorrentIndexerBase { public override string Name => "TorrentPotato"; - public override string[] IndexerUrls => new string[] { "http://127.0.0.1" }; + public override string[] IndexerUrls => new[] { "http://127.0.0.1" }; public override string Description => "A JSON based torrent provider previously developed for CouchPotato"; public override DownloadProtocol Protocol => DownloadProtocol.Torrent; diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoParser.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoParser.cs index 847a965d3..8bb215d90 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoParser.cs @@ -6,7 +6,7 @@ using NzbDrone.Common.Http; using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Parser.Model; -namespace NzbDrone.Core.Indexers.TorrentPotato +namespace NzbDrone.Core.Indexers.Definitions.TorrentPotato { public class TorrentPotatoParser : IParseIndexerResponse { @@ -31,17 +31,18 @@ namespace NzbDrone.Core.Indexers.TorrentPotato foreach (var torrent in jsonResponse.Resource.results) { - var torrentInfo = new TorrentInfo(); - - torrentInfo.Guid = GetGuid(torrent); - torrentInfo.Title = torrent.release_name; - torrentInfo.Size = (long)torrent.size * 1000 * 1000; - torrentInfo.DownloadUrl = torrent.download_url; - torrentInfo.InfoUrl = torrent.details_url; - torrentInfo.PublishDate = torrent.publish_date.ToUniversalTime(); - torrentInfo.Seeders = torrent.seeders; - torrentInfo.Peers = torrent.leechers + torrent.seeders; - torrentInfo.Freeleech = torrent.freeleech; + var torrentInfo = new TorrentInfo + { + Guid = GetGuid(torrent), + Title = torrent.release_name, + Size = (long)torrent.size * 1000 * 1000, + DownloadUrl = torrent.download_url, + InfoUrl = torrent.details_url, + PublishDate = torrent.publish_date.ToUniversalTime(), + Seeders = torrent.seeders, + Peers = torrent.leechers + torrent.seeders, + Freeleech = torrent.freeleech + }; results.Add(torrentInfo); } diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoRequestGenerator.cs index f77e97a6d..922bf5d43 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoRequestGenerator.cs @@ -4,16 +4,12 @@ using NzbDrone.Common.Extensions; using NzbDrone.Common.Http; using NzbDrone.Core.IndexerSearch.Definitions; -namespace NzbDrone.Core.Indexers.TorrentPotato +namespace NzbDrone.Core.Indexers.Definitions.TorrentPotato { public class TorrentPotatoRequestGenerator : IIndexerRequestGenerator { public TorrentPotatoSettings Settings { get; set; } - public TorrentPotatoRequestGenerator() - { - } - public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoResponse.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoResponse.cs index ca89524eb..b199157d8 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoResponse.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoResponse.cs @@ -1,6 +1,6 @@ using System; -namespace NzbDrone.Core.Indexers.TorrentPotato +namespace NzbDrone.Core.Indexers.Definitions.TorrentPotato { public class TorrentPotatoResponse { diff --git a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoSettings.cs b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoSettings.cs index 3cf3ae35d..7f7e7fb23 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoSettings.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/TorrentPotato/TorrentPotatoSettings.cs @@ -3,7 +3,7 @@ using NzbDrone.Core.Annotations; using NzbDrone.Core.Indexers.Settings; using NzbDrone.Core.Validation; -namespace NzbDrone.Core.Indexers.TorrentPotato +namespace NzbDrone.Core.Indexers.Definitions.TorrentPotato { public class TorrentPotatoSettingsValidator : NoAuthSettingsValidator {