You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to handle IRC announces that have a variable number of lines (e.g. a main announce and an optional freeleech line).
For example, with SugoiMusic, we might have the following announces:
[TV Music] TV Show – Title [TS / MPEG-2 / 1440x1080 / AAC / Japanese / NoSubs] - https://sugoimusic.me/torrents.php?id=000010 / https://sugoimusic.me/torrents.php?action=download&id=000011 - japanese,live Uploaded by: Uploader
FREELEECH - https://sugoimusic.me/torrents.php?id=000010 / https://sugoimusic.me/torrents.php?action=download&id=000011
[Single] Artist – Album Name [FLAC] - https://sugoimusic.me/torrents.php?id=000020 / https://sugoimusic.me/torrents.php?action=download&id=000021 - japanese,pop,female.vocalist Uploaded by: Uploader
The first two lines are for a freeleech torrent, the third is for a non-freeleech torrent.
The second line is optional and only used for freeleech content.
Ideally, we'd be able to do something like this in sugoimusic.yaml:
parse:
type: multilines:
- test:
- "[Album] Artist – Album Name [FLAC / 2017 / catnumber] - https://sugoimusic.me/torrents.php?id=000010 / https://sugoimusic.me/torrents.php?action=download&id=000011 - japanese,pop,female.vocalist Uploaded by: Uploader 1"
- "[Single] Artist – Album Name [MP3] - https://sugoimusic.me/torrents.php?id=000020 / https://sugoimusic.me/torrents.php?action=download&id=000021 - japanese,pop,dance Uploaded by: Uploader 2"
- "[Album] Artist – Album Name [FLAC / 2023 / (+2) / catnumber] - https://sugoimusic.me/torrents.php?id=000030 / https://sugoimusic.me/torrents.php?action=download&id=000031 - japanese Uploaded by: Uploader 3"
- "[TV Music] TV Show – Title [TS / MPEG-2 / 1920x1080 / AAC / Japanese / NoSubs] - https://sugoimusic.me/torrents.php?id=000040 / https://sugoimusic.me/torrents.php?action=download&id=000041 - japanese,live Uploaded by: Uploader 4"pattern: '(\[(.*)\] .*? – .+? \[((?:[^/]+)?(?:(?: \/ )(\d{4}))?(?: \/ [^/]+)*)\]) - (https?://.+/).+id=(\d+) \/ https?://.+action=download&id=(\d+) - (.*) Uploaded by: (.*)'vars:
- torrentName
- category
- releaseTags
- year
- baseUrl
- groupId
- torrentId
- tags
- uploader
- test:
- "FREELEECH - https://sugoimusic.me/torrents.php?id=000010 / https://sugoimusic.me/torrents.php?action=download&id=000011"pattern: '(FREELEECH)?.*'optional: truevars:
- freeleech
Currently, using multi here would expect two lines every time and miss some announces.
It would be nice to be able to handle IRC announces that have a variable number of lines (e.g. a main announce and an optional freeleech line).
For example, with SugoiMusic, we might have the following announces:
The first two lines are for a freeleech torrent, the third is for a non-freeleech torrent.
The second line is optional and only used for freeleech content.
Ideally, we'd be able to do something like this in
sugoimusic.yaml
:Currently, using
multi
here would expect two lines every time and miss some announces.Related: #1255
The text was updated successfully, but these errors were encountered: