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
|
@ -5,7 +5,7 @@ identifier: myanonamouse
|
|||
description: MyAnonaMouse (MAM) is a large ebook and audiobook tracker.
|
||||
language: en-us
|
||||
urls:
|
||||
- https://www.myanonamouse.net
|
||||
- https://www.myanonamouse.net/
|
||||
privacy: private
|
||||
protocol: torrent
|
||||
supports:
|
||||
|
@ -47,24 +47,24 @@ irc:
|
|||
label: NickServ Password
|
||||
help: NickServ password
|
||||
|
||||
parse:
|
||||
type: single
|
||||
lines:
|
||||
- test:
|
||||
- "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 1.00 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 )"
|
||||
- "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 2.11 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 ) VIP"
|
||||
pattern: 'New Torrent: (.*) By: (.*) Category: \( (.*) \) Size: \( (.*) \) Filetype: \( (.*) \) Language: \( (.*) \) Link: \( (https?\:\/\/[^\/]+\/).*?(\d+)\s*\)\s*(VIP)?'
|
||||
vars:
|
||||
- torrentName
|
||||
- author
|
||||
- category
|
||||
- torrentSize
|
||||
- tags
|
||||
- language
|
||||
- baseUrl
|
||||
- torrentId
|
||||
- freeleech
|
||||
parse:
|
||||
type: single
|
||||
lines:
|
||||
- test:
|
||||
- "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 1.00 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 )"
|
||||
- "New Torrent: Some famous book By: Author name Category: ( Ebooks - Science Fiction ) Size: ( 2.11 MiB ) Filetype: ( epub, mobi ) Language: ( English ) Link: ( https://www.myanonamouse.net/t/000000 ) VIP"
|
||||
pattern: 'New Torrent: (.*) By: (.*) Category: \( (.*) \) Size: \( (.*) \) Filetype: \( (.*) \) Language: \( (.*) \) Link: \( (https?\:\/\/[^\/]+\/).*?(\d+)\s*\)\s*(VIP)?'
|
||||
vars:
|
||||
- torrentName
|
||||
- author
|
||||
- category
|
||||
- torrentSize
|
||||
- tags
|
||||
- language
|
||||
- baseUrl
|
||||
- torrentId
|
||||
- freeleech
|
||||
|
||||
match:
|
||||
torrenturl: "{{ .baseUrl }}tor/download.php?tid={{ .torrentId }}"
|
||||
torrentname: "{{ .torrentName }} by {{ .author }} [{{ .language }} / {{ .tags }}]"
|
||||
match:
|
||||
torrenturl: "/tor/download.php?tid={{ .torrentId }}"
|
||||
torrentname: "{{ .torrentName }} by {{ .author }} [{{ .language }} / {{ .tags }}]"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue