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; using NLog; namespace Jackett.Common.Indexers { [ExcludeFromCodeCoverage] public class Orpheus : GazelleTracker { // API Reference: https://github.com/OPSnet/Gazelle/wiki/JSON-API-Documentation protected override string DownloadUrl => SiteLink + "ajax.php?action=download" + (useTokens ? "&usetoken=1" : "") + "&id="; protected override string AuthorizationFormat => "token {0}"; protected override int ApiKeyLength => 118; protected override string FlipOptionalTokenString(string requestLink) => requestLink.Replace("usetoken=1", ""); 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 { MovieSearchParams = new List { MovieSearchParam.Q, MovieSearchParam.Genre }, MusicSearchParams = new List { MusicSearchParam.Q, MusicSearchParam.Album, MusicSearchParam.Artist, MusicSearchParam.Label, MusicSearchParam.Year, MusicSearchParam.Genre }, BookSearchParams = new List { BookSearchParam.Q, BookSearchParam.Genre } }, configService: configService, client: wc, logger: l, p: ps, cs: cs, supportsFreeleechTokens: true, has2Fa: false, useApiKey: true, usePassKey: false, instructionMessageOptional: "
  1. Go to Orpheus's site and open your account settings.
  2. Under Access Settings click on 'Create a new token'
  3. Give it a name you like and click Generate.
  4. Copy the generated API Key and paste it in the above text field.
") { 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.Audio, "Comedy"); AddCategoryMapping(7, TorznabCatType.Books, "Comics"); } } }