mirror of
https://github.com/Jackett/Jackett
synced 2025-02-23 23:00:51 +00:00
Apollo: migrate to Gazelle base
This commit is contained in:
parent
11ff114a61
commit
6a24c55f06
3 changed files with 36 additions and 96 deletions
|
@ -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"
|
|
35
src/Jackett.Common/Indexers/Apollo.cs
Normal file
35
src/Jackett.Common/Indexers/Apollo.cs
Normal file
|
@ -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<string>() { "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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -196,6 +196,7 @@ namespace Jackett.Updater
|
||||||
"Definitions/blubits.yml",
|
"Definitions/blubits.yml",
|
||||||
"Definitions/torrentproject.yml",
|
"Definitions/torrentproject.yml",
|
||||||
"Definitions/torrentvault.yml",
|
"Definitions/torrentvault.yml",
|
||||||
|
"Definitions/apollo.yml", // migrated to C# gazelle base tracker
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var oldFIle in oldFiles)
|
foreach (var oldFIle in oldFiles)
|
||||||
|
|
Loading…
Reference in a new issue