refactor: settings format picker redesign with Audio/Video sub-pickers, fix delete routing
All checks were successful
CI / build (push) Successful in 48s
All checks were successful
CI / build (push) Successful in 48s
- Replace Type/Quality settings with single Format button -> Audio/Video sub-pickers - Each sub-picker shows format options (bitrates for audio, resolutions for video) - Replace DefaultQuality with DefaultAudioFormat/DefaultVideoFormat in UserPreferences - Add DB migration 002 for new preference columns - Update repo layer SQL queries for new schema - Update playlist flow to use new preference fields - Fix missing deleteaccount and delaccount_ callback routing - Add back_format routing for format picker navigation
This commit is contained in:
@@ -64,7 +64,8 @@ func TestPreferences(t *testing.T) {
|
||||
}
|
||||
|
||||
prefs.DefaultMediaType = domain.MediaTypeAudio
|
||||
prefs.DefaultQuality = "best"
|
||||
prefs.DefaultAudioFormat = "best"
|
||||
prefs.DefaultVideoFormat = "1080p"
|
||||
prefs.DefaultContainer = "mp3"
|
||||
prefs.DefaultLanguage = "en"
|
||||
if err := s.UpdatePreferences(userID, prefs); err != nil {
|
||||
@@ -78,8 +79,11 @@ func TestPreferences(t *testing.T) {
|
||||
if got.DefaultMediaType != domain.MediaTypeAudio {
|
||||
t.Errorf("media type = %v, want Audio", got.DefaultMediaType)
|
||||
}
|
||||
if got.DefaultQuality != "best" {
|
||||
t.Errorf("quality = %q, want best", got.DefaultQuality)
|
||||
if got.DefaultAudioFormat != "best" {
|
||||
t.Errorf("audio format = %q, want best", got.DefaultAudioFormat)
|
||||
}
|
||||
if got.DefaultVideoFormat != "1080p" {
|
||||
t.Errorf("video format = %q, want 1080p", got.DefaultVideoFormat)
|
||||
}
|
||||
if got.DefaultContainer != "mp3" {
|
||||
t.Errorf("container = %q, want mp3", got.DefaultContainer)
|
||||
|
||||
Reference in New Issue
Block a user