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

82 lines
2.1 KiB
YAML

---
#id: danishbytes
name: DanishBytes
identifier: danishbytes
description: DanishBytes is a private torrent tracker for HD MOVIES / TV
language: en-us
urls:
- https://danishbytes.club/
- https://danishbytes2.org/
- https://dbytes.org/
- https://danishbytes.art/
privacy: private
protocol: torrent
supports:
- irc
- rss
# source: UNIT3D
settings:
- name: passkey
type: secret
required: true
label: RSS key
help: "Go to your profile tab under safety, copy RSS Key (RID)"
irc:
network: DanishBytes
server: irc.danishbytes.club
port: 6697
tls: true
channels:
- "#Announce"
announcers:
- DBBot
settings:
- name: nick
type: text
required: true
label: Nick
help: Bot nick. Eg. user_bot
- name: auth.account
type: text
required: false
label: NickServ Account
help: NickServ account. Make sure to group your user and bot.
- name: auth.password
type: secret
required: false
label: NickServ Password
help: NickServ password
parse:
type: single
lines:
- tests:
- line: ':[N]-[Movies]-[Encode]-[720p]-[797 MiB]-[Some.Old.Movie.1972.720p.BluRay.x264.AAC-GROUP]-[Anonymous]-[https://danishbytes.club/torrents/0000]-[FL: 0]-[DU: 0];'
expect:
category: Movies
releaseTags: Encode
resolution: 720p
torrentSize: 797 MiB
torrentName: Some.Old.Movie.1972.720p.BluRay.x264.AAC-GROUP
uploader: Anonymous
baseUrl: https://danishbytes.club/
torrentId: "0000"
freeleech: "0"
pattern: ':\[N\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*)\]-\[(.*\/)(?:.*\/)(.*)\]-\[FL: (.*)\]-\[DU: .*\];'
vars:
- category
- releaseTags
- resolution
- torrentSize
- torrentName
- uploader
- baseUrl
- torrentId
- freeleech
match:
infourl: "/torrents/{{ .torrentId }}"
torrenturl: "/torrent/download/{{ .torrentId }}.{{ .passkey }}"