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

90 lines
2.8 KiB
YAML

---
#id: Aither
name: Aither
identifier: aither
description: Aither is a community-built Movie/TV/FANRES database.
language: en-us
urls:
- https://aither.cc/
privacy: private
protocol: torrent
supports:
- irc
- rss
# source: UNIT3D
settings:
- name: rsskey
type: secret
required: true
label: RSS key (RID)
help: "Go to your profile tab, Settings > Security, copy RSS Key (RID)"
irc:
network: Aither.cc
server: irc.aither.cc
port: 6697
tls: true
channels:
- "#Feed"
announcers:
- BOT
settings:
- name: nick
type: text
required: true
label: Username
help: Profile > Settings > External Chat Tokens > Add Device Token.
- name: pass
type: secret
required: true
label: Token
help: Profile > Settings > External Chat Tokens > Token.
parse:
type: single
lines:
- tests:
- line: Category [Music] Type [Music - General] Name [Melanie Martinez - Copy Cat 2020 WEB FLAC 24-bits 44.1 kHz] Freeleech [0%] Internal [No] Double Upload [No] Size [44.06 MB] Uploader [Pure] Url [https://aither.cc/torrents/download/1231231]
expect:
category: Music
releaseTags: Music - General
torrentName: Melanie Martinez - Copy Cat 2020 WEB FLAC 24-bits 44.1 kHz
resolution: ""
freeleechPercent: 0%
internal: "No"
tags: "No"
torrentSize: 44.06 MB
uploader: Pure
baseUrl: https://aither.cc/
torrentId: "1231231"
- line: Category [Movie] Type [WEB-DL] Name [Izla 2021 FIL 1080p NF WEB-DL DD+ 5.1 H.264-HBO] Resolution [1080p] Freeleech [0%] Internal [No] Double Upload [No] Size [3.38 GB] Uploader [Anonymous] Url [https://aither.cc/torrents/download/213123123]
expect:
category: Movie
releaseTags: WEB-DL
torrentName: Izla 2021 FIL 1080p NF WEB-DL DD+ 5.1 H.264-HBO
resolution: 1080p
freeleechPercent: 0%
internal: "No"
tags: "No"
torrentSize: 3.38 GB
uploader: Anonymous
baseUrl: https://aither.cc/
torrentId: "213123123"
pattern: 'Category \[(.+)\] Type \[(.+)\] Name \[(.+?)\] ?(?:Resolution \[(.*)\])? Freeleech \[(.+)\] Internal \[(.+)\] Double Upload \[(.+)\] Size \[(.+)\] Uploader \[(.+)\] Url \[(https?\:\/\/.+\/).+\/.+\/(\d+)\]'
vars:
- category
- releaseTags
- torrentName
- resolution
- freeleechPercent
- internal
- tags
- torrentSize
- uploader
- baseUrl
- torrentId
match:
infourl: "/torrents/{{ .torrentId }}"
torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}"