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