autobrr/internal/indexer/definitions/ptp.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

123 lines
3.3 KiB
YAML

---
#id: ptp
name: PassThePopcorn
identifier: ptp
description: PassThePopcorn (PTP) is a private torrent tracker for MOVIES
language: en-us
urls:
- https://passthepopcorn.me/
privacy: private
protocol: torrent
supports:
- irc
- rss
- api
# source: gazelle
settings:
- name: authkey
type: secret
required: true
label: Auth key
help: Right click DL on a torrent and get the authkey.
- name: torrent_pass
type: secret
required: true
label: Torrent pass
help: Right click DL on a torrent and get the torrent_pass.
- name: api_user
type: secret
required: true
label: API User
help: Edit profile -> Security -> Generate new api keys
- name: api_key
type: secret
required: true
label: API Key
help: Edit profile -> Security -> Generate new api keys
# api:
# url: https://passthepopcorn.me/
# type: json
# limits:
# max: 60
# per: minute
# settings:
# - name: api_user
# type: secret
# label: API User
# help: Edit profile -> Security -> Generate new api keys
# - name: api_key
# type: secret
# label: API Key
# help: Edit profile -> Security -> Generate new api keys
irc:
network: PassThePopcorn
server: irc.passthepopcorn.me
port: 7000
tls: true
channels:
- "#ptp-announce-dev"
announcers:
- Hummingbird
settings:
- name: nick
type: text
required: true
label: Nick
help: Bot nick. Eg. user|autodl
- 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
- name: invite_command
type: secret
default: "Hummingbird ENTER USERNAME IRCKEY #ptp-announce-dev"
required: true
label: Invite command
help: Invite auth with Hummingbird. Replace USERNAME and IRCKEY.
parse:
type: single
lines:
- tests:
- line: That Movie [1972] by Some Director | x264 / Blu-ray / MKV / 1080p | 204371 | 964303 | That.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance
expect:
year: "1972"
releaseTags: x264 / Blu-ray / MKV / 1080p
freeleech: ""
torrentId: "964303"
torrentName: That.Movie.1972.1080p.BluRay.FLAC.x264-GROUP
tags: comedy, drama, romance
- line: That Other Movie [1972] | x264 / Blu-ray / MKV / 1080p / Freeleech! | 204371 | 964303 | That.Other.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance
expect:
year: "1972"
releaseTags: x264 / Blu-ray / MKV / 1080p / Freeleech!
freeleech: Freeleech
torrentId: "964303"
torrentName: That.Other.Movie.1972.1080p.BluRay.FLAC.x264-GROUP
tags: comedy, drama, romance
pattern: '.* \[(.*)\] (?:by .*)?\| (.*?(?: \/ (Freeleech)!)?) \| .* \| (.*) \| (.*) \| (.*)'
vars:
- year
- releaseTags
- freeleech
- torrentId
- torrentName
- tags
match:
infourl: "/torrents.php?torrentid={{ .torrentId }}"
torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}"