diff --git a/internal/domain/filter.go b/internal/domain/filter.go index de6fc8f..af4e3cb 100644 --- a/internal/domain/filter.go +++ b/internal/domain/filter.go @@ -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"` diff --git a/internal/domain/releasetags.go b/internal/domain/releasetags.go index 598d3a7..45fe0e7 100644 --- a/internal/domain/releasetags.go +++ b/internal/domain/releasetags.go @@ -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 diff --git a/internal/domain/releasetags_test.go b/internal/domain/releasetags_test.go index 228f57a..80c77c2 100644 --- a/internal/domain/releasetags_test.go +++ b/internal/domain/releasetags_test.go @@ -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"}}}, diff --git a/web/src/domain/constants.ts b/web/src/domain/constants.ts index 8137517..2a8cdfc 100644 --- a/web/src/domain/constants.ts +++ b/web/src/domain/constants.ts @@ -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 }));