diff --git a/compress-videos.js b/compress-videos.js index c81dc6ce..c2096b13 100644 --- a/compress-videos.js +++ b/compress-videos.js @@ -121,8 +121,13 @@ async function processOne(inPath) { const args = [...common, ...videoArgs, outPath]; console.log(`Compressing: ${inPath} -> ${outPath}`); - await runFFmpeg(args); - console.log(`Finished: ${outPath}`); + try { + await runFFmpeg(args); + console.log(`Finished: ${outPath}`); + } catch (e) { + console.log(`Failed: ${outPath}`); + await fs.unlink(outPath); + } } async function runWithLimit(items, limit, fn) { diff --git a/package.json b/package.json index e77ca031..d938fabe 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,12 @@ }, "scripts": { "dev": "tauri dev", - "browser": "concurrently 'pnpm:b:*'", - "b:server": "node server.js", - "b:vite": "vitepress dev docs --open", - "vite": "vitepress dev docs", - "build": "vitepress build docs", + "build": "tauri build", + "browser": "concurrently 'pnpm:browser:*'", + "browser:server": "node server.js", + "browser:vite": "vitepress dev docs --open", + "vite-dev": "vitepress dev docs", + "vite-build": "vitepress build docs", "preview": "vitepress preview docs" } } \ No newline at end of file diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 795ce046..d0e33bd2 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -6,8 +6,8 @@ "build": { "frontendDist": "../docs/.vitepress/dist", "devUrl": "http://localhost:5173", - "beforeDevCommand": "pnpm vite", - "beforeBuildCommand": "pnpm build" + "beforeDevCommand": "pnpm vite-dev", + "beforeBuildCommand": "pnpm vite-build" }, "app": { "windows": [