mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 05:47:22 -04:00
parent
eccd72304c
commit
1aa9149866
1 changed files with 30 additions and 0 deletions
|
@ -2,6 +2,7 @@ using System.Collections.Generic;
|
|||
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 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
|
||||
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…
Add table
Add a link
Reference in a new issue