mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-06 03:30:19 +02:00
parent
eccd72304c
commit
1aa9149866
1 changed files with 30 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using NLog;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Indexers.Gazelle;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.Definitions
|
||||
|
|
@ -50,5 +51,34 @@ protected override IndexerCapabilities SetCapabilities()
|
|||
|
||||
return caps;
|
||||
}
|
||||
|
||||
public override IParseIndexerResponse GetParser()
|
||||
{
|
||||
return new OrpheusParser(Settings, Capabilities);
|
||||
}
|
||||
}
|
||||
|
||||
public class OrpheusParser : GazelleParser
|
||||
{
|
||||
public OrpheusParser(GazelleSettings settings, IndexerCapabilities capabilities)
|
||||
: base(settings, capabilities)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string GetDownloadUrl(int torrentId)
|
||||
{
|
||||
var url = new HttpUri(_settings.BaseUrl)
|
||||
.CombinePath("/torrents.php")
|
||||
.AddQueryParam("action", "download")
|
||||
.AddQueryParam("id", torrentId);
|
||||
|
||||
// Orpheus fails to download if usetoken=0 so we need to only add if we will use one
|
||||
if (_settings.UseFreeleechToken)
|
||||
{
|
||||
url.AddQueryParam("useToken", "1");
|
||||
}
|
||||
|
||||
return url.FullUri;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue