From 9f7593f6f1186b7b6e23e98d1dcb3de64896f54b Mon Sep 17 00:00:00 2001 From: hbrain Date: Wed, 27 May 2026 08:04:16 +0200 Subject: [PATCH] Use AJAX admin switches with toast feedback --- new.php | 46 +++++++++++++++++++++++++++++++++++++++------- style.css | 2 +- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/new.php b/new.php index d5bc13d..ff4bc83 100644 --- a/new.php +++ b/new.php @@ -350,7 +350,13 @@ try { exit; } } -} catch (Throwable $e) { $err = $e->getMessage(); } +} catch (Throwable $e) { + if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['ajax'])) { + http_response_code(400); + ajax_json(['ok'=>false, 'error'=>$e->getMessage()]); + } + $err = $e->getMessage(); +} $dirs = input_dirs($config['uploads_dir']); $dirInfo = load_input_dir_cache($dirs); sort_input_dirs_by_metadata_date($dirs, $dirInfo); @@ -368,26 +374,52 @@ if ($editName !== '') { try { $editDir = safe_input_dir($config['uploads_dir'],

Videos without input dir

No orphan videos.


MB
-

Existing input dirs

No input directories yet.

No video yet

No video

· files · ·

+

Existing input dirs

No input directories yet.

No video yet

No video

· files · ·

Edit input dir

in-dir/

This input directory is . Editing is disabled until the job completes.

Edit input dir

in-dir/

Files and captions

No caption for audio files

Add new movie input