mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(releases): improve log score parsing (#604)
* feat(releases): improve logscore parsing * feat(releases): test case naming
This commit is contained in:
parent
9fbd592adc
commit
84c7a4484e
3 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,7 @@ func init() {
|
|||
{tag: "FLAC", title: "Free Lossless Audio Codec", regexp: "", re: nil},
|
||||
{tag: "LiNE", title: "Line", regexp: "(?-i:L[iI]NE)", re: nil},
|
||||
{tag: "Lossless", title: "", regexp: "(?i:Lossless)", re: nil},
|
||||
{tag: "Log100", title: "", regexp: "(log 100%)", re: nil},
|
||||
{tag: "Log100", title: "", regexp: "(log 100%|log \\(100%\\))", re: nil},
|
||||
{tag: "Log", title: "", regexp: "(?:log)", re: nil},
|
||||
{tag: "LPCM", title: "Linear Pulse-Code Modulation", regexp: "", re: nil},
|
||||
{tag: "MP3", title: "", regexp: "", re: nil},
|
||||
|
|
|
@ -39,6 +39,7 @@ func TestParseReleaseTagString(t *testing.T) {
|
|||
{name: "music_3", args: args{tags: "FLAC Lossless Log 100% Cue CD"}, want: ReleaseTags{Audio: []string{"Cue", "FLAC", "Lossless", "Log100", "Log"}, Source: "CD"}},
|
||||
{name: "music_4", args: args{tags: "FLAC 24bit Lossless Log 100% Cue CD"}, want: ReleaseTags{Audio: []string{"24BIT Lossless", "Cue", "FLAC", "Lossless", "Log100", "Log"}, Source: "CD"}},
|
||||
{name: "music_5", args: args{tags: "MP3 320 WEB"}, want: ReleaseTags{Audio: []string{"320", "MP3"}, Source: "WEB"}},
|
||||
{name: "music_6", args: args{tags: "FLAC Lossless Log (100%) Cue CD"}, want: ReleaseTags{Audio: []string{"Cue", "FLAC", "Lossless", "Log100", "Log"}, Source: "CD"}},
|
||||
{name: "movies_1", args: args{tags: "x264 Blu-ray MKV 1080p"}, want: ReleaseTags{Codec: "x264", Source: "BluRay", Resolution: "1080p", Container: "mkv"}},
|
||||
{name: "movies_2", args: args{tags: "HEVC HDR Blu-ray mp4 2160p"}, want: ReleaseTags{Codec: "HEVC", Source: "BluRay", Resolution: "2160p", Container: "mp4", HDR: []string{"HDR"}}},
|
||||
{name: "movies_3", args: args{tags: "HEVC HDR DV Blu-ray mp4 2160p"}, want: ReleaseTags{Codec: "HEVC", Source: "BluRay", Resolution: "2160p", Container: "mp4", HDR: []string{"HDR", "DV"}}},
|
||||
|
|
|
@ -60,6 +60,7 @@ irc:
|
|||
- test:
|
||||
- "TORRENT: That Artist - Albuum [2002] [Single] - FLAC / Lossless / WEB - 2000s,house,uk.garage,garage.house - https://orpheus.network/torrents.php?id=000000 / https://orpheus.network/torrents.php?action=download&id=0000000"
|
||||
- "TORRENT: Something [2021] [Album] - FLAC / Lossless / CD - - https://orpheus.network/torrents.php?id=000000 / https://orpheus.network/torrents.php?action=download&id=0000000"
|
||||
- "TORRENT: Artist 1 & Artist 2 - Best album (subtitle) [2004] [Album] - FLAC / Lossless / Log (100%) / Cue / CD - experimental,ambient,downtempo - https://orpheus.network/torrents.php?id=000000 / https://orpheus.network/torrents.php?action=download&id=0000000"
|
||||
pattern: 'TORRENT: (.*) \[(.+?)\] \[(.+?)\] - (.*) - \s*(.*) - https?:\/\/.* \/ (https?:\/\/.+\/).+id=(\d+)'
|
||||
vars:
|
||||
- torrentName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue