mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59: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: passkey
|
||||
type: secret
|
||||
|
@ -57,11 +57,47 @@ irc:
|
|||
parse:
|
||||
type: single
|
||||
lines:
|
||||
- test:
|
||||
- "New Torrent: Clockers 1995 1080p Blu-ray AVC DTS-HD MA 5.1-Anonymous - Type: Movie (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 37.61 GiB - https://hdbits.org/details.php?id=12345&hit=1"
|
||||
- "New Torrent: PilotsEYE tv: QUITO 2014 1080p Blu-ray AVC DD 2.0 - Type: Documentary (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 23.14 GiB - https://hdbits.org/details.php?id=12345&hit=1"
|
||||
- "New Torrent: Xiao Q 2019 720p BluRay DD-EX 5.1 x264-Anonymous - Type: Movie (H.264, Encode) Internal! - Uploaded by: Anonymous - Size: 4.54 GiB - https://hdbits.org/details.php?id=12345&hit=1"
|
||||
- "New Torrent: The Gentlemen 2019 UHD Blu-ray English TrueHD 7.1 - Type: Audio Track - Uploaded by: Anonymous - Size: 3.19 GiB - https://hdbits.org/details.php?id=519896&hit=1"
|
||||
- tests:
|
||||
- line: 'New Torrent: Clockers 1995 1080p Blu-ray AVC DTS-HD MA 5.1-Anonymous - Type: Movie (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 37.61 GiB - https://hdbits.org/details.php?id=12345&hit=1'
|
||||
expect:
|
||||
torrentName: Clockers 1995 1080p Blu-ray AVC DTS-HD MA 5.1-Anonymous
|
||||
category: Movie
|
||||
releaseTags: H.264, Blu-ray/HD DVD
|
||||
origin: ""
|
||||
uploader: Anonymous
|
||||
torrentSize: 37.61 GiB
|
||||
baseUrl: https://hdbits.org/
|
||||
torrentId: "12345"
|
||||
- line: 'New Torrent: PilotsEYE tv: QUITO 2014 1080p Blu-ray AVC DD 2.0 - Type: Documentary (H.264, Blu-ray/HD DVD) - Uploaded by: Anonymous - Size: 23.14 GiB - https://hdbits.org/details.php?id=12345&hit=1'
|
||||
expect:
|
||||
torrentName: 'PilotsEYE tv: QUITO 2014 1080p Blu-ray AVC DD 2.0'
|
||||
category: Documentary
|
||||
releaseTags: H.264, Blu-ray/HD DVD
|
||||
origin: ""
|
||||
uploader: Anonymous
|
||||
torrentSize: 23.14 GiB
|
||||
baseUrl: https://hdbits.org/
|
||||
torrentId: "12345"
|
||||
- line: 'New Torrent: Xiao Q 2019 720p BluRay DD-EX 5.1 x264-Anonymous - Type: Movie (H.264, Encode) Internal! - Uploaded by: Anonymous - Size: 4.54 GiB - https://hdbits.org/details.php?id=12345&hit=1'
|
||||
expect:
|
||||
torrentName: Xiao Q 2019 720p BluRay DD-EX 5.1 x264-Anonymous
|
||||
category: Movie
|
||||
releaseTags: H.264, Encode
|
||||
origin: Internal
|
||||
uploader: Anonymous
|
||||
torrentSize: 4.54 GiB
|
||||
baseUrl: https://hdbits.org/
|
||||
torrentId: "12345"
|
||||
- line: 'New Torrent: The Gentlemen 2019 UHD Blu-ray English TrueHD 7.1 - Type: Audio Track - Uploaded by: Anonymous - Size: 3.19 GiB - https://hdbits.org/details.php?id=519896&hit=1'
|
||||
expect:
|
||||
torrentName: The Gentlemen 2019 UHD Blu-ray English TrueHD 7.1
|
||||
category: Audio Track
|
||||
releaseTags: ""
|
||||
origin: ""
|
||||
uploader: Anonymous
|
||||
torrentSize: 3.19 GiB
|
||||
baseUrl: https://hdbits.org/
|
||||
torrentId: "519896"
|
||||
pattern: '^New Torrent: (.+) - Type: (.+?) (?:\((.+)\))?\s?(?:(Internal)!?)?\s?- Uploaded by: (.+) - Size: (.+) - (https://.+?/).+id=(\d+)'
|
||||
vars:
|
||||
- torrentName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue