Fixed: (TorrentPotato) Update namespace

pull/1609/head
Bogdan 2 years ago
parent 5e8bfa2ffb
commit 245e573089

@ -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<TorrentPotatoSettings>
{
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;

@ -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);
}

@ -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();

@ -1,6 +1,6 @@
using System;
namespace NzbDrone.Core.Indexers.TorrentPotato
namespace NzbDrone.Core.Indexers.Definitions.TorrentPotato
{
public class TorrentPotatoResponse
{

@ -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<TorrentPotatoSettings>
{

Loading…
Cancel
Save