|
|
|
@ -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
|
|
|
|
@ -49,5 +50,29 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override IParseIndexerResponse GetParser()
|
|
|
|
|
{
|
|
|
|
|
return new OrpheusParser(Settings, Capabilities, BaseUrl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class OrpheusParser : GazelleParser
|
|
|
|
|
{
|
|
|
|
|
public OrpheusParser(GazelleSettings settings, IndexerCapabilities capabilities, string baseUrl)
|
|
|
|
|
: base(settings, capabilities, baseUrl)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override string GetDownloadUrl(int torrentId)
|
|
|
|
|
{
|
|
|
|
|
var url = new HttpUri(_baseUrl)
|
|
|
|
|
.CombinePath("/ajax.php")
|
|
|
|
|
.AddQueryParam("action", "download")
|
|
|
|
|
.AddQueryParam("useToken", _settings.UseFreeleechToken ? "1" : "0")
|
|
|
|
|
.AddQueryParam("id", torrentId);
|
|
|
|
|
|
|
|
|
|
return url.FullUri;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|