Skip to content

Commit 82e3cd9

Browse files
committed
fix mutual exclusivity of video/audio profile selection and default audio quality
1 parent 1b27bed commit 82e3cd9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/lib/components/download/DownloadForm.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -822,10 +822,10 @@
822822
const defaultProfile = profiles.find((p: any) => p.isDefault);
823823
if (defaultProfile && !defaultProfile.audioOnly) {
824824
selectedVideoProfileId = defaultProfile.id;
825-
}
826-
const defaultAudio = profiles.find((p: any) => p.isSystem && p.audioOnly);
827-
if (defaultAudio) {
828-
selectedAudioProfileId = defaultAudio.id;
825+
selectedAudioProfileId = null;
826+
} else if (defaultProfile?.audioOnly) {
827+
selectedAudioProfileId = defaultProfile.id;
828+
selectedVideoProfileId = null;
829829
}
830830
const active = profiles.find((p: any) => p.id === activeProfileId);
831831
if (active) loadProfileFlags(active);
@@ -941,10 +941,10 @@
941941
const sysDefault = profiles.find((p: any) => p.isDefault);
942942
if (sysDefault && !sysDefault.audioOnly) {
943943
selectedVideoProfileId = sysDefault.id;
944-
}
945-
const defaultAudio = profiles.find((p: any) => p.isSystem && p.audioOnly);
946-
if (defaultAudio) {
947-
selectedAudioProfileId = defaultAudio.id;
944+
selectedAudioProfileId = null;
945+
} else if (sysDefault?.audioOnly) {
946+
selectedAudioProfileId = sysDefault.id;
947+
selectedVideoProfileId = null;
948948
}
949949
const active = profiles.find((p: any) => p.id === activeProfileId);
950950
if (active) loadProfileFlags(active);

0 commit comments

Comments
 (0)