From 43e84760980e6845871897681652b7e5ff8e5ef8 Mon Sep 17 00:00:00 2001 From: hbrain Date: Mon, 15 Jun 2026 04:46:26 +0200 Subject: [PATCH 1/3] Allow permalink pages without showing on index --- index.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index a234328..1ebebe9 100644 --- a/index.php +++ b/index.php @@ -84,6 +84,24 @@ function shown_video_paths($config){ return $videos; } +function permalink_video_paths($config, $articleId){ + $articleId = strtolower(trim((string)$articleId)); + if (!preg_match('/^[0-9]{14}[a-f0-9]{16}$/', $articleId)) return []; + foreach (glob($config['uploads_dir'].'/*', GLOB_ONLYDIR) ?: [] as $dir) { + if (!is_file($dir . '/.mvlog-permalink')) continue; + if (read_article_id($dir) !== $articleId) continue; + $stateFile = $dir . '/.movmaker-state.json'; + if (!is_file($stateFile)) return []; + $state = json_decode((string)file_get_contents($stateFile), true); + if (!is_array($state)) return []; + $name = basename((string)($state['output'] ?? '')); + if ($name === '' || preg_match('/_preview\.(mp4|webm|mov|m4v)$/i', $name)) return []; + $path = $config['videos_dir'] . '/' . $name; + return is_file($path) ? [$path] : []; + } + return []; +} + function public_url_path($path){ $path = str_replace('\\', '/', trim((string)$path)); if ($path === '') return ''; @@ -309,9 +327,8 @@ if ($articleId !== '') { if (!article_permalink_enabled($config, $articleId)) { render_404_page(); } - $videos = array_values(array_filter($allVideos, function($v) use ($articleId, $config) { - return video_article_id($config, basename($v)) === $articleId; - })); + // Permalink pages are allowed when Permalink is ON, even if Show is OFF. + $videos = permalink_video_paths($config, $articleId); $rawKeyword = ''; $keywordType = 'general'; $keywordValue = ''; From d7a61847198edfad1d1e00097bd6d1d2bcf8bd1f Mon Sep 17 00:00:00 2001 From: hbrain Date: Mon, 15 Jun 2026 05:16:23 +0200 Subject: [PATCH 2/3] Add upper save button on edit form --- admin.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/admin.php b/admin.php index 40b5a32..cf07b7f 100644 --- a/admin.php +++ b/admin.php @@ -1543,7 +1543,7 @@ $runningJobs = active_worker_jobs($config);
RenderingEditEdit

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
+

Edit input dir

in-dir/

Files and captions

No caption for audio files

Add new movie input