mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(filters): add DSD formats to music (#1993)
This commit is contained in:
parent
ac30f2b0a7
commit
b980b5530d
4 changed files with 26 additions and 7 deletions
|
@ -133,8 +133,8 @@ type Filter struct {
|
|||
Albums string `json:"albums,omitempty"`
|
||||
MatchReleaseTypes []string `json:"match_release_types,omitempty"` // Album,Single,EP
|
||||
ExceptReleaseTypes string `json:"except_release_types,omitempty"`
|
||||
Formats []string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS
|
||||
Quality []string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, Other
|
||||
Formats []string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS, DSD
|
||||
Quality []string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, DSD64, DSD128, DSD256, DSD512, Other
|
||||
Media []string `json:"media,omitempty"` // CD, DVD, Vinyl, Soundboard, SACD, DAT, Cassette, WEB, Other
|
||||
PerfectFlac bool `json:"perfect_flac,omitempty"`
|
||||
Cue bool `json:"cue,omitempty"`
|
||||
|
@ -267,8 +267,8 @@ type FilterUpdate struct {
|
|||
Albums *string `json:"albums,omitempty"`
|
||||
MatchReleaseTypes *[]string `json:"match_release_types,omitempty"` // Album,Single,EP
|
||||
ExceptReleaseTypes *string `json:"except_release_types,omitempty"`
|
||||
Formats *[]string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS
|
||||
Quality *[]string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, Other
|
||||
Formats *[]string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS, DSD
|
||||
Quality *[]string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, DSD64, DSD128, DSD256, DSD512, Other
|
||||
Media *[]string `json:"media,omitempty"` // CD, DVD, Vinyl, Soundboard, SACD, DAT, Cassette, WEB, Other
|
||||
PerfectFlac *bool `json:"perfect_flac,omitempty"`
|
||||
Cue *bool `json:"cue,omitempty"`
|
||||
|
|
|
@ -61,6 +61,11 @@ func init() {
|
|||
{tag: "V0 (VBR)", title: "V0 Variable Bit Rate", regexp: "", re: nil},
|
||||
{tag: "V1 (VBR)", title: "V1 Variable Bit Rate", regexp: "", re: nil},
|
||||
{tag: "V2 (VBR)", title: "V2 Variable Bit Rate", regexp: "", re: nil},
|
||||
{tag: "DSD", title: "Direct Stream Digital", regexp: "", re: nil},
|
||||
{tag: "DSD64", title: "DSD Oversampling ratio 64x", regexp: "", re: nil},
|
||||
{tag: "DSD128", title: "DSD Oversampling ratio 128x", regexp: "", re: nil},
|
||||
{tag: "DSD256", title: "DSD Oversampling ratio 256x", regexp: "", re: nil},
|
||||
{tag: "DSD512", title: "DSD Oversampling ratio 512x", regexp: "", re: nil},
|
||||
}
|
||||
types["audio"] = audio
|
||||
|
||||
|
@ -80,6 +85,10 @@ func init() {
|
|||
{tag: "V0 (VBR)", title: "V0 Variable Bit Rate", regexp: "", re: nil},
|
||||
{tag: "V1 (VBR)", title: "V1 Variable Bit Rate", regexp: "", re: nil},
|
||||
{tag: "V2 (VBR)", title: "V2 Variable Bit Rate", regexp: "", re: nil},
|
||||
{tag: "DSD64", title: "DSD Oversampling ratio 64x", regexp: "", re: nil},
|
||||
{tag: "DSD128", title: "DSD Oversampling ratio 128x", regexp: "", re: nil},
|
||||
{tag: "DSD256", title: "DSD Oversampling ratio 256x", regexp: "", re: nil},
|
||||
{tag: "DSD512", title: "DSD Oversampling ratio 512x", regexp: "", re: nil},
|
||||
}
|
||||
types["audioBitrate"] = audioBitrate
|
||||
|
||||
|
@ -107,6 +116,7 @@ func init() {
|
|||
{tag: "OGG", title: "", regexp: "", re: nil},
|
||||
{tag: "OPUS", title: "", regexp: "", re: nil},
|
||||
{tag: "TrueHD", title: "Dolby TrueHD", regexp: "(?:dolby[\\-\\._ ]?)?true[\\-\\._ ]?hd", re: nil},
|
||||
{tag: "DSD", title: "Direct Stream Digital", regexp: "", re: nil},
|
||||
}
|
||||
types["audioFormat"] = audioFormat
|
||||
|
||||
|
|
|
@ -45,7 +45,11 @@ func TestParseReleaseTagString(t *testing.T) {
|
|||
{name: "music_4", args: args{tags: "FLAC 24bit Lossless Log 100% Cue CD"}, want: ReleaseTags{Audio: []string{"24BIT Lossless", "Cue", "FLAC", "Log100", "Log"}, AudioBitrate: "24BIT Lossless", AudioFormat: "FLAC", Source: "CD", HasLog: true, LogScore: 100, HasCue: true}},
|
||||
{name: "music_5", args: args{tags: "MP3 320 WEB"}, want: ReleaseTags{Audio: []string{"320", "MP3"}, AudioBitrate: "320", AudioFormat: "MP3", Source: "WEB"}},
|
||||
{name: "music_6", args: args{tags: "FLAC Lossless Log (100%) Cue CD"}, want: ReleaseTags{Audio: []string{"Cue", "FLAC", "Lossless", "Log100", "Log"}, AudioBitrate: "Lossless", AudioFormat: "FLAC", Source: "CD", HasCue: true, HasLog: true, LogScore: 100}},
|
||||
{name: "music_7", args: args{tags: "FLAC / Lossless / Log / Cue / CD"}, want: ReleaseTags{Audio: []string{"Cue", "FLAC", "Lossless", "Log"}, AudioBitrate: "Lossless", AudioFormat: "FLAC", Source: "CD", HasLog: true, HasCue: true}},
|
||||
{name: "music_7", args: args{tags: "FLAC / Lossless / Log / Cue / CD"}, want: ReleaseTags{Audio: []string{"Cue", "FLAC", "Lossless", "Log"}, AudioBitrate: "Lossless", AudioFormat: "FLAC", Source: "CD", HasLog: true, HasCue: true}},
|
||||
{name: "music_8", args: args{tags: "DSD / DSD64 / WEB"}, want: ReleaseTags{Audio: []string{"DSD", "DSD64"}, AudioBitrate: "DSD64", AudioFormat: "DSD", Source: "WEB"}},
|
||||
{name: "music_9", args: args{tags: "DSD / DSD128 / WEB"}, want: ReleaseTags{Audio: []string{"128", "DSD", "DSD128"}, AudioBitrate: "DSD128", AudioFormat: "DSD", Source: "WEB"}},
|
||||
{name: "music_10", args: args{tags: "DSD / DSD256 / WEB"}, want: ReleaseTags{Audio: []string{"256", "DSD", "DSD256"}, AudioBitrate: "DSD256", AudioFormat: "DSD", Source: "WEB"}},
|
||||
{name: "music_11", args: args{tags: "DSD / DSD512 / WEB"}, want: ReleaseTags{Audio: []string{"DSD", "DSD512"}, AudioBitrate: "DSD512", AudioFormat: "DSD", Source: "WEB"}},
|
||||
{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"}}},
|
||||
|
|
|
@ -119,7 +119,8 @@ export const formatMusic = [
|
|||
"Ogg",
|
||||
"AAC",
|
||||
"AC3",
|
||||
"DTS"
|
||||
"DTS",
|
||||
"DSD"
|
||||
];
|
||||
|
||||
export const FORMATS_OPTIONS: MultiSelectOption[] = formatMusic.map(r => ({ value: r, label: r, key: r }));
|
||||
|
@ -148,7 +149,11 @@ export const qualityMusic = [
|
|||
"V1 (VBR)",
|
||||
"V0 (VBR)",
|
||||
"Lossless",
|
||||
"24bit Lossless"
|
||||
"24bit Lossless",
|
||||
"DSD64",
|
||||
"DSD128",
|
||||
"DSD256",
|
||||
"DSD512"
|
||||
];
|
||||
|
||||
export const QUALITY_MUSIC_OPTIONS: MultiSelectOption[] = qualityMusic.map(v => ({ value: v, label: v, key: v }));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue