mirror of
https://github.com/idanoo/autobrr
synced 2025-07-24 01:09:13 +00:00
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>
This commit is contained in:
parent
e842a7bd42
commit
fef0da5711
83 changed files with 1887 additions and 565 deletions
|
@ -12,7 +12,7 @@ supports:
|
|||
- irc
|
||||
- rss
|
||||
- api
|
||||
source: gazelle
|
||||
# source: gazelle
|
||||
settings:
|
||||
- name: authkey
|
||||
type: secret
|
||||
|
@ -38,21 +38,21 @@ settings:
|
|||
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
|
||||
# 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
|
||||
|
@ -92,9 +92,23 @@ irc:
|
|||
parse:
|
||||
type: single
|
||||
lines:
|
||||
- test:
|
||||
- "That Movie [1972] by Some Director | x264 / Blu-ray / MKV / 1080p | 204371 | 964303 | That.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance"
|
||||
- "That Other Movie [1972] | x264 / Blu-ray / MKV / 1080p / Freeleech! | 204371 | 964303 | That.Other.Movie.1972.1080p.BluRay.FLAC.x264-GROUP | comedy, drama, romance"
|
||||
- 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue