Jackett/src/Jackett.Common/Indexers/Orpheus.cs

67 lines
3.0 KiB
C#
Raw Normal View History

2020-02-09 02:35:16 +00:00
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Jackett.Common.Indexers.Abstract;
using Jackett.Common.Models;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients;
2017-12-05 15:15:19 +00:00
using NLog;
namespace Jackett.Common.Indexers
2017-12-05 15:15:19 +00:00
{
[ExcludeFromCodeCoverage]
public class Orpheus : GazelleTracker
2017-12-05 15:15:19 +00:00
{
// API Reference: https://github.com/OPSnet/Gazelle/wiki/JSON-API-Documentation
protected override string DownloadUrl => SiteLink + "ajax.php?action=download&usetoken=" + (useTokens ? "1" : "0") + "&id=";
protected override string AuthorizationFormat => "token {0}";
protected override int ApiKeyLength => 118;
public Orpheus(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps,
ICacheService cs)
: base(id: "orpheus",
name: "Orpheus",
description: "A music tracker",
link: "https://orpheus.network/",
caps: new TorznabCapabilities
{
TvSearchParams = new List<TvSearchParam>
{
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep
},
MovieSearchParams = new List<MovieSearchParam>
{
MovieSearchParam.Q
},
2020-10-18 21:20:08 +00:00
MusicSearchParams = new List<MusicSearchParam>
{
2020-10-18 21:20:08 +00:00
MusicSearchParam.Q, MusicSearchParam.Album, MusicSearchParam.Artist, MusicSearchParam.Label, MusicSearchParam.Year
},
BookSearchParams = new List<BookSearchParam>
{
BookSearchParam.Q
}
},
configService: configService,
client: wc,
logger: l,
p: ps,
cs: cs,
supportsFreeleechTokens: true,
2021-06-06 01:18:37 +00:00
has2Fa: false,
useApiKey: true,
usePassKey: false,
instructionMessageOptional: "<ol><li>Go to Orpheus's site and open your account settings.</li><li>Under <b>Access Settings</b> click on 'Create a new token'</li><li>Give it a name you like and click <b>Generate</b>.</li><li>Copy the generated API Key and paste it in the above text field.</li></ol>")
2017-12-05 15:15:19 +00:00
{
Language = "en-us";
Type = "private";
AddCategoryMapping(1, TorznabCatType.Audio, "Music");
AddCategoryMapping(2, TorznabCatType.PC, "Applications");
AddCategoryMapping(3, TorznabCatType.Books, "E-Books");
AddCategoryMapping(4, TorznabCatType.AudioAudiobook, "Audiobooks");
AddCategoryMapping(5, TorznabCatType.Movies, "E-Learning Videos");
AddCategoryMapping(6, TorznabCatType.TV, "Comedy");
AddCategoryMapping(7, TorznabCatType.Books, "Comics");
}
}
}