autobrr/internal/indexer/definitions/retroflix.yaml
Frederick Robinson fef0da5711
feat(definitions): add expectations for test lines (#1257)
* factor out test helpers

* refactor, add tests for animebytes

* revert test refactor

* better name

* change format, migrate some examples

* migrated remaining test cases

* add comment about `Test` vs `Tests`

* refactor

* reorder expectations to match vars

* generate

* turn on strict unmarshalling, remove old `Test` from schema

* start modifying actual definitions

* done with the As

* Bs

* C, D

* E, F

* G, H, I, ... L

* M, N

* O, P

* R

* bonus error. without this, pattern/vars disagreement can panic.

* S

* T, U

* X.. Now we know our ABCs next time won't you sing with meeeee

* fix another test

* another driveby change

* be less strict parsing custom definitions

* fix(definitions): load custom definitions

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-11-18 15:41:39 +01:00

83 lines
2.3 KiB
YAML

---
#id: retroflix
name: RetroFlix
identifier: retroflix
description: RetroFlix (RFX) is a private torrent tracker for CLASSIC MOVIES / TV / GENERAL
language: en-us
urls:
- https://retroflix.club/
privacy: private
protocol: torrent
supports:
- irc
- rss
# source: custom
settings:
- name: passkey
type: secret
required: true
label: Passkey
help: "Go to User CP, User CP Home and copy the passkey"
irc:
network: P2P-Network
server: irc.p2p-network.net
port: 6697
tls: true
channels:
- "#retroflix"
announcers:
- retroflix-announcer
- retroflix-announcer1
- retroflix-announcer2
- retroflix-announcer3
settings:
- name: nick
type: text
required: true
label: Nick
help: Bot nick. Eg. user_bot
- name: auth.account
type: text
required: true
label: NickServ Account
help: NickServ account. Make sure to group your user and bot.
- name: auth.password
type: secret
required: true
label: NickServ Password
help: NickServ password
parse:
type: single
lines:
- tests:
- line: New! (Movies) - [REQUESTED].French.Movie.(1978).(French.with.English.Subtitles) - (18.76 GB) - https://retroflix.club/browse/t/00000/french-movie-1978-french-with-english-subtitles
expect:
category: Movies
torrentName: French.Movie.(1978).(French.with.English.Subtitles)
torrentSize: 18.76 GB
baseUrl: https://retroflix.club/
torrentId: "00000"
- line: New! (Movies) - Old.Movie.1967.1080p.BluRay.x265.10bit-GROUP1 - (5.42 GB) - https://retroflix.club/browse/t/00000/old-movie-1967-1080p-bluray-x265-10bit-group1
expect:
category: Movies
torrentName: Old.Movie.1967.1080p.BluRay.x265.10bit-GROUP1
torrentSize: 5.42 GB
baseUrl: https://retroflix.club/
torrentId: "00000"
pattern: '^New! \((.*)\) - (?:\[REQUESTED\].)?(.*) - \((.*)\) - (https?:\/\/.*\/)browse/t/(\d+).*'
vars:
- category
- torrentName
- torrentSize
- baseUrl
- torrentId
match:
infourl: "/browse/t/{{ .torrentId }}/{{ .torrentName }}"
torrenturl: "/download.php?id={{ .torrentId }}&passkey={{ .passkey }}"
encode:
- torrentName