fix: check for ANY .mov file and use PowerShell script

This commit is contained in:
Jannik committed 2026-09-05 19:23:09 +02:00
1 parent 71007c880a
commit 49888bda10
3 files changed
+12 -8

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
@echo off
cd /d "%~dp0"
echo Starte zyklischen Viz Auto-Render Check...
node worker.mjs
+4
View File
@@ -0,0 +1,4 @@
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
Set-Location -Path $ScriptDir
Write-Host "Starte zyklischen Viz Auto-Render Check..." -ForegroundColor Cyan
node worker.mjs
+8 -4
View File
@@ -37,11 +37,15 @@ async function main() {
// Zieldateiname bestimmen
const targetFormat = job.format === 'prores4444' ? 'prores' : (job.format || 'prores');
const outExt = (targetFormat === 'prores' || targetFormat === 'qtrle') ? '.mov' : (targetFormat === 'webm_alpha' ? '.webm' : '.mp4');
const finalTitle = job.title ? job.title.replace(/[^a-zA-Z0-9_-]/g, '_') : 'Output';
const expectedVideoPath = path.join(vizDir, `${finalTitle}${outExt}`);
// Prüfen, ob bereits irgendeine Datei mit dieser Endung (z.B. .mov) im Ordner liegt
const hasVideoAlready = files.some(f => f.toLowerCase().endsWith(outExt));
// Job nur vormerken, wenn das Video noch NICHT existiert
if (!fs.existsSync(expectedVideoPath)) {
// Job nur vormerken, wenn NOCH KEIN solches Video existiert
if (!hasVideoAlready) {
// Wir definieren dennoch einen finalen Dateinamen für den neuen Render
const finalTitle = job.title ? job.title.replace(/[^a-zA-Z0-9_-]/g, '_') : 'Output';
const expectedVideoPath = path.join(vizDir, `${finalTitle}${outExt}`);
pendingJobs.push({ jsonPath, job, expectedVideoPath, targetFormat });
}
} catch (e) {