From 50ead953d893b1aa6b10f15265add0cb03afd462 Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 23 Feb 2026 15:23:10 -0700 Subject: [PATCH] Using selected resolution defaults when editing video with no resolutions are selected. --- app/src/components/Download.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/components/Download.js b/app/src/components/Download.js index c8ca73d1..070f0bf4 100644 --- a/app/src/components/Download.js +++ b/app/src/components/Download.js @@ -422,8 +422,9 @@ export function VideosDownloadForm({ setConfig(result); // Update form with video resolutions from config only if user hasn't changed them - // and if no download object was provided (this is a new download, not an edit) - if (result && result.video_resolutions && !userChangedResolutions && !download) { + // and if the download doesn't already have video_resolutions set + const downloadHasResolutions = download?.settings?.video_resolutions?.length > 0; + if (result && result.video_resolutions && !userChangedResolutions && !downloadHasResolutions) { form.setValue('settings.video_resolutions', result.video_resolutions); } } catch (error) { @@ -646,8 +647,9 @@ export function ChannelDownloadForm({ setIsConfigLoaded(true); // Update form with video resolutions from config only if user hasn't changed them - // and if no download object was provided (this is a new download, not an edit) - if (result && result.video_resolutions && !userChangedResolutions && !download) { + // and if the download doesn't already have video_resolutions set + const downloadHasResolutions = download?.settings?.video_resolutions?.length > 0; + if (result && result.video_resolutions && !userChangedResolutions && !downloadHasResolutions) { form.setValue('settings.video_resolutions', result.video_resolutions); } } catch (error) { @@ -953,8 +955,9 @@ export function RSSDownloadForm({download, submitter, onDelete, onCancel, action setIsConfigLoaded(true); // Update form with video resolutions from config only if user hasn't changed them - // and if no download object was provided (this is a new download, not an edit) - if (result && result.video_resolutions && !userChangedResolutions && !download) { + // and if the download doesn't already have video_resolutions set + const downloadHasResolutions = download?.settings?.video_resolutions?.length > 0; + if (result && result.video_resolutions && !userChangedResolutions && !downloadHasResolutions) { form.setValue('settings.video_resolutions', result.video_resolutions); } } catch (error) {