mirror of
https://github.com/idanoo/autobrr
synced 2025-07-24 17:29:12 +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
|
@ -11,7 +11,7 @@ protocol: torrent
|
|||
supports:
|
||||
- irc
|
||||
- rss
|
||||
source: custom
|
||||
# source: custom
|
||||
settings:
|
||||
- name: rsskey
|
||||
type: secret
|
||||
|
@ -51,11 +51,31 @@ irc:
|
|||
parse:
|
||||
type: single
|
||||
lines:
|
||||
- test:
|
||||
- "tehFire: [Applications|Windows] Chen went to the Mall :: preGAP: 1m and 32s :: https://pretome.info/details.php?id=696969"
|
||||
- "[Movies|x264] Orlando.Bloom.Had.A.Cow-GROUP :: preGAP: P2P source :: https://pretome.info/details.php?id=646321"
|
||||
- "tehFIRE: [TV|XviD] Royal.Institution.Christmas.Lectures.2009.Part2.WS.PDTV.XviD-WATERS :: preGAP: 1m and 9s :: https://pretome.info/details.php?id=127107"
|
||||
- "tehFIRE: [TV|x264] Newsreaders.S01E05.HDTV.x264-2HD https://pretome.info/details.php?id=333951"
|
||||
- tests:
|
||||
- line: 'tehFire: [Applications|Windows] Chen went to the Mall :: preGAP: 1m and 32s :: https://pretome.info/details.php?id=696969'
|
||||
expect:
|
||||
category: Applications|Windows
|
||||
torrentName: Chen went to the Mall
|
||||
baseUrl: https://pretome.info/
|
||||
torrentId: "696969"
|
||||
- line: '[Movies|x264] Orlando.Bloom.Had.A.Cow-GROUP :: preGAP: P2P source :: https://pretome.info/details.php?id=646321'
|
||||
expect:
|
||||
category: Movies|x264
|
||||
torrentName: Orlando.Bloom.Had.A.Cow-GROUP
|
||||
baseUrl: https://pretome.info/
|
||||
torrentId: "646321"
|
||||
- line: 'tehFIRE: [TV|XviD] Royal.Institution.Christmas.Lectures.2009.Part2.WS.PDTV.XviD-WATERS :: preGAP: 1m and 9s :: https://pretome.info/details.php?id=127107'
|
||||
expect:
|
||||
category: TV|XviD
|
||||
torrentName: Royal.Institution.Christmas.Lectures.2009.Part2.WS.PDTV.XviD-WATERS
|
||||
baseUrl: https://pretome.info/
|
||||
torrentId: "127107"
|
||||
- line: 'tehFIRE: [TV|x264] Newsreaders.S01E05.HDTV.x264-2HD https://pretome.info/details.php?id=333951'
|
||||
expect:
|
||||
category: TV|x264
|
||||
torrentName: 'Newsreaders.S01E05.HDTV.x264-2HD '
|
||||
baseUrl: https://pretome.info/
|
||||
torrentId: "333951"
|
||||
pattern: '\[([^\]]+)\] ([^:]+)(?: :: [^:]+:.* :: )?(https?\:\/\/.+\/).*id=(\d+)'
|
||||
vars:
|
||||
- category
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue