mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 09:56:17 -05:00
Using selected resolution defaults when editing video with no resolutions are selected.
This commit is contained in:
parent
c6393437af
commit
50ead953d8
1 changed files with 9 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue