mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00

* 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>
93 lines
2.3 KiB
YAML
93 lines
2.3 KiB
YAML
---
|
|
#id: trancetraffic
|
|
name: TranceTraffic
|
|
identifier: trancetraffic
|
|
description: TranceTraffic is a Private site for MUSIC
|
|
language: en-us
|
|
urls:
|
|
- https://trancetraffic.com/
|
|
privacy: private
|
|
protocol: torrent
|
|
supports:
|
|
- irc
|
|
- rss
|
|
# source: unknown
|
|
settings:
|
|
- name: passkey
|
|
type: secret
|
|
required: true
|
|
label: Passkey
|
|
help: "Go to https://www.trancetraffic.com/links.php, click on RSS Feed and copy your passkey from the url."
|
|
|
|
irc:
|
|
network: P2P-Network
|
|
server: irc.p2p-network.net
|
|
port: 6697
|
|
tls: true
|
|
channels:
|
|
- "#trancetraffic"
|
|
announcers:
|
|
- TranceTraffic
|
|
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
|
|
|
|
parse:
|
|
type: multi
|
|
lines:
|
|
- tests:
|
|
- line: 'New Torrent Uploaded:'
|
|
expect:
|
|
raw: "New Torrent Uploaded:"
|
|
pattern: '^New Torrent Uploaded:'
|
|
- tests:
|
|
- line: 'Name....: That Artist - Good Album-SAT-01-30-2021-GROUP'
|
|
expect:
|
|
torrentName: That Artist - Good Album-SAT-01-30-2021-GROUP
|
|
pattern: '^Name\.*:\s*(.*)'
|
|
vars:
|
|
- torrentName
|
|
- tests:
|
|
- line: 'Uploader: anon'
|
|
expect:
|
|
uploader: anon
|
|
pattern: '^Uploader\.*:\s*(.*)'
|
|
vars:
|
|
- uploader
|
|
- tests:
|
|
- line: 'Category: Livesets - House'
|
|
expect:
|
|
category: Livesets - House
|
|
pattern: '^Category\.*:\s*(.*)'
|
|
vars:
|
|
- category
|
|
- tests:
|
|
- line: 'URL.....: https://www.trancetraffic.com/details.php?id=000000&hit=1'
|
|
expect:
|
|
baseUrl: https://www.trancetraffic.com/
|
|
torrentId: "000000"
|
|
pattern: '^URL\.*:\s*(https?\:\/\/[^\/]+\/).*[&\?]id=(\d+)'
|
|
vars:
|
|
- baseUrl
|
|
- torrentId
|
|
|
|
match:
|
|
infourl: "/details.php?id={{ .torrentId }}"
|
|
torrenturl: "/download.php/{{ .torrentId }}/{{ .torrentName }}.torrent?passkey={{ .passkey }}"
|
|
encode:
|
|
- torrentName
|