diff --git a/src/Jackett.Common/Definitions/apollo.yml b/src/Jackett.Common/Definitions/apollo.yml deleted file mode 100644 index 336f08cf0..000000000 --- a/src/Jackett.Common/Definitions/apollo.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- - site: apollo - name: Apollo - description: "A music tracker" - language: en-us - type: private - encoding: UTF-8 - links: - - https://apollo.rip - - caps: - categorymappings: - - {id: 1, cat: Audio, desc: "Music"} - - {id: 2, cat: PC, desc: "Applications"} - - {id: 3, cat: Books, desc: "E-Books"} - - {id: 4, cat: Audio/Audiobook, desc: "Audiobooks"} - - {id: 5, cat: Movies, desc: "E-Learning Videos"} - - {id: 6, cat: TV, desc: "Comedy"} - - {id: 7, cat: Books/Comics, desc: "Comics"} - - modes: - search: [q] - tv-search: [q, season, ep] - - login: - path: login.php - method: post - inputs: - username: "{{ .Config.username }}" - password: "{{ .Config.password }}" - keeplogged: 1 - login: "Log in" - error: - - selector: form#loginform > span.warning - test: - path: torrents.php - - ratio: - path: torrents.php - selector: li#stats_ratio > span - - search: - paths: - - path: torrents.php - inputs: - $raw: "{{range .Categories}}filter_cat[{{.}}]=1&{{end}}" - searchstr: "{{ .Query.Keywords }}" - order_by: time - order_way: desc - action: basic - searchsubmit: 1 - rows: - selector: table#torrent_table > tbody > tr.torrent - fields: - download: - selector: a[href^="torrents.php?action=download&id="] - attribute: href - description: - selector: div.group_info - remove: span - title: - selector: div.group_info - remove: span, div.tags - category: - selector: td.cats_col - case: - div.cats_music: 1 - div.cats_applications: 2 - div.cats_ebooks: 3 - div.cats_audiobooks: 4 - div.cats_elearningvideos: 5 - div.cats_comedy: 6 - div.cats_comics: 7 - comments: - selector: a[href^="torrents.php?id="] - attribute: href - files: - selector: td:nth-child(3) - date: - selector: td:nth-child(4) - size: - selector: td:nth-child(5) - grabs: - selector: td:nth-child(6) - seeders: - selector: td:nth-child(7) - leechers: - selector: td:nth-child(8) - downloadvolumefactor: - case: - ":root div.alertbar:contains(\"freeleech\")": "0" - ":root div.alertbar:contains(\"FREELEECH\")": "0" - "*": "1" - uploadvolumefactor: - case: - "*": "1" \ No newline at end of file diff --git a/src/Jackett.Common/Indexers/Apollo.cs b/src/Jackett.Common/Indexers/Apollo.cs new file mode 100644 index 000000000..fe8d1422b --- /dev/null +++ b/src/Jackett.Common/Indexers/Apollo.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using Jackett.Indexers.Abstract; +using Jackett.Models; +using Jackett.Services.Interfaces; +using Jackett.Utils.Clients; +using NLog; + +namespace Jackett.Indexers +{ + public class Apollo : GazelleTracker + { + public Apollo(IIndexerConfigurationService configService, WebClient webClient, Logger logger, IProtectionService protectionService) + : base(name: "Apollo", + desc: "A music tracker", + link: "https://apollo.rip/", + configService: configService, + logger: logger, + protectionService: protectionService, + webClient: webClient + ) + { + Language = "en-us"; + Type = "private"; + TorznabCaps.SupportedMusicSearchParamsList = new List() { "q", "album", "artist", "label", "year" }; + + 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"); + } + } +} \ No newline at end of file diff --git a/src/Jackett.Updater/Program.cs b/src/Jackett.Updater/Program.cs index 73567b89c..01f59d9d9 100644 --- a/src/Jackett.Updater/Program.cs +++ b/src/Jackett.Updater/Program.cs @@ -196,6 +196,7 @@ namespace Jackett.Updater "Definitions/blubits.yml", "Definitions/torrentproject.yml", "Definitions/torrentvault.yml", + "Definitions/apollo.yml", // migrated to C# gazelle base tracker }; foreach (var oldFIle in oldFiles)