mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(indexers): add support for optional baseurl override (#551)
* feat(indexers): optional baseurl override * feat(indexers): update baseUrl parsing * refactor(indexers): BREAKING move parse to IRC struct * Move Parse as part of IRC struct from Indexer * Updated definitions * Build torrentUrl in stages * Use new url.JoinPath to build torrentUrl * Update tests * refactor(indexers): select option obj * refactor(indexers): make backwards compatible
This commit is contained in:
parent
301180e55b
commit
25a165b764
66 changed files with 1533 additions and 1211 deletions
|
@ -60,27 +60,27 @@ irc:
|
|||
label: Invite command
|
||||
help: Invite auth with Voyager. Replace USERNAME with site nick and set IRCKEY.
|
||||
|
||||
parse:
|
||||
type: multi
|
||||
forcesizeunit: MB
|
||||
lines:
|
||||
- test:
|
||||
- "[New Release]-[MovieHD]-[That.Movie.2017.INTERNAL.1080p.BluRay.CRF.x264-GROUP]-[URL]-[ https://alpharatio.cc/torrents.php?id=000000 ]-[ 000000 ]-[ Uploaded 2 Mins, 59 Secs after pre. ]"
|
||||
pattern: \[New Release\]-\[(.*)\]-\[(.*)\]-\[URL\]-\[ (https?://.*)id=\d+ \]-\[ (\d+) \](?:-\[ Uploaded (.*) after pre. ])?
|
||||
vars:
|
||||
- category
|
||||
- torrentName
|
||||
- baseUrl
|
||||
- torrentId
|
||||
- preTime
|
||||
- test:
|
||||
- "[AutoDL]-[MovieHD]-[000000]-[ 1 | 10659 | 1 | 1 ]-[That.Movie.2017.INTERNAL.1080p.BluRay.CRF.x264-GROUP]"
|
||||
pattern: \[AutoDL\]-\[.*\]-\[.*\]-\[ ([01]) \| (\d+) \| ([01]) \| ([01]) \]-\[.+\]
|
||||
vars:
|
||||
- scene
|
||||
- torrentSize
|
||||
- freeleech
|
||||
- auto
|
||||
parse:
|
||||
type: multi
|
||||
forcesizeunit: MB
|
||||
lines:
|
||||
- test:
|
||||
- "[new release]-[moviehd]-[that.movie.2017.internal.1080p.bluray.crf.x264-group]-[url]-[ https://alpharatio.cc/torrents.php?id=000000 ]-[ 000000 ]-[ uploaded 2 mins, 59 secs after pre. ]"
|
||||
pattern: \[new release\]-\[(.*)\]-\[(.*)\]-\[url\]-\[ (https?://.+/).+id=\d+ \]-\[ (\d+) \](?:-\[ uploaded (.*) after pre. ])?
|
||||
vars:
|
||||
- category
|
||||
- torrentName
|
||||
- baseUrl
|
||||
- torrentId
|
||||
- preTime
|
||||
- test:
|
||||
- "[AutoDL]-[MovieHD]-[000000]-[ 1 | 10659 | 1 | 1 ]-[That.Movie.2017.INTERNAL.1080p.BluRay.CRF.x264-GROUP]"
|
||||
pattern: \[AutoDL\]-\[.*\]-\[.*\]-\[ ([01]) \| (\d+) \| ([01]) \| ([01]) \]-\[.+\]
|
||||
vars:
|
||||
- scene
|
||||
- torrentSize
|
||||
- freeleech
|
||||
- auto
|
||||
|
||||
match:
|
||||
torrenturl: "{{ .baseUrl }}action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}"
|
||||
match:
|
||||
torrenturl: "/torrents.php?action=download&id={{ .torrentId }}&authkey={{ .authkey }}&torrent_pass={{ .torrent_pass }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue