2020-02-09 02:35:16 +00:00
using System.Collections.Generic ;
2020-05-03 23:35:52 +00:00
using System.Diagnostics.CodeAnalysis ;
2018-03-10 08:05:56 +00:00
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 ;
2018-03-10 08:05:56 +00:00
namespace Jackett.Common.Indexers
2017-12-05 15:15:19 +00:00
{
2020-05-03 23:35:52 +00:00
[ExcludeFromCodeCoverage]
2018-11-12 14:39:05 +00:00
public class Orpheus : GazelleTracker
2017-12-05 15:15:19 +00:00
{
2021-06-06 00:31:25 +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 ;
2020-12-11 22:14:21 +00:00
public Orpheus ( IIndexerConfigurationService configService , WebClient wc , Logger l , IProtectionService ps ,
ICacheService cs )
2020-05-11 19:59:28 +00:00
: base ( id : "orpheus" ,
name : "Orpheus" ,
2020-04-04 06:56:51 +00:00
description : "A music tracker" ,
link : "https://orpheus.network/" ,
caps : new TorznabCapabilities
{
2020-10-18 20:47:36 +00:00
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 20:47:36 +00:00
{
2020-10-18 21:20:08 +00:00
MusicSearchParam . Q , MusicSearchParam . Album , MusicSearchParam . Artist , MusicSearchParam . Label , MusicSearchParam . Year
2020-10-20 00:38:27 +00:00
} ,
BookSearchParams = new List < BookSearchParam >
{
BookSearchParam . Q
2020-10-18 20:47:36 +00:00
}
2020-04-04 06:56:51 +00:00
} ,
configService : configService ,
client : wc ,
logger : l ,
p : ps ,
2020-12-11 22:14:21 +00:00
cs : cs ,
2020-04-04 06:56:51 +00:00
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" ) ;
}
}
2018-11-12 14:39:05 +00:00
}