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

87 lines
2.6 KiB
YAML

---
#id: tdc
name: TheDarkCommunity
identifier: tdc
description: TheDarkCommunity (TDC) is a private torrent tracker for MOVIES / TV
language: en-US
urls:
- https://thedarkcommunity.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: TheDarkCommunity
server: irc.thedarkcommunity.cc
port: 6697
tls: true
channels:
- "#Announce"
announcers:
- TDCBOT
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: Category [TV] Type [WEB-DL] Name [The Cars That Made the World S01 1080p WEB-DL AAC 2.0 H.264-EDITH] Freeleech [0%] Double Upload [No] Size [6.57 GB] Uploader [User] Url [https://thedarkcommunity.cc/torrents/download/8483]
expect:
category: TV
releaseTags: WEB-DL
torrentName: The Cars That Made the World S01 1080p WEB-DL AAC 2.0 H.264-EDITH
freeleechPercent: 0%
torrentSize: 6.57 GB
uploader: User
baseUrl: https://thedarkcommunity.cc/
torrentId: "8483"
- line: Category [TV] Type [WEB-DL] Name [Ax Men S09 1080p WEB-DL AAC 2.0 H.264-TURBO] Freeleech [0%] Double Upload [No] Size [26.87 GB] Uploader [User] Url [https://thedarkcommunity.cc/torrents/download/8484]
expect:
category: TV
releaseTags: WEB-DL
torrentName: Ax Men S09 1080p WEB-DL AAC 2.0 H.264-TURBO
freeleechPercent: 0%
torrentSize: 26.87 GB
uploader: User
baseUrl: https://thedarkcommunity.cc/
torrentId: "8484"
pattern: '.*\[(.*)\].*\[(.*)\].*\[(.*)\].*\[(.*)\].*\[(?:.*)\].*\[(.*)\].*\[(.*)\].*(https?\:\/\/.*?\/).*\/(\d+).*'
vars:
- category
- releaseTags
- torrentName
- freeleechPercent
- torrentSize
- uploader
- baseUrl
- torrentId
match:
infourl: "/torrents/{{ .torrentId }}"
torrenturl: "/torrent/download/{{ .torrentId }}.{{ .rsskey }}"