feat(scan): binary FIX scan reads frl_/frd_ names from .aep (no AE, never hangs)
Build backend images / build content-svc (push) Failing after 15s
Build backend images / build file-svc (push) Failing after 1m51s
Build backend images / build gateway (push) Failing after 51s
Build backend images / build identity-svc (push) Failing after 57s
Build backend images / build notification-svc (push) Failing after 52s
Build backend images / build render-svc (push) Failing after 56s
Build backend images / build studio-svc (push) Failing after 57s
Build backend images / build content-svc (push) Failing after 15s
Build backend images / build file-svc (push) Failing after 1m51s
Build backend images / build gateway (push) Failing after 51s
Build backend images / build identity-svc (push) Failing after 57s
Build backend images / build notification-svc (push) Failing after 52s
Build backend images / build render-svc (push) Failing after 56s
Build backend images / build studio-svc (push) Failing after 57s
Root cause of 'stuck on AE': heavy expression-driven projects take >10min for AE to open, exceeding the scan timeout → job dies → admin UI stuck 'scanning'. Fix: extend the stdlib .aep RIFX parser to collect every Utf8 name (ParseNames), since FIX media placeholders are renamed footage ITEMS (frl_c1m1), not layers, and text are layer names (frl_c1t1) — both are Utf8 chunks. QuickScan now branches on ?mode= (or auto-detects frl_ names) and scaffolds FIX scenes/elements + frd_*color slots directly from the binary. Verified on the real final.aep that timed out in AE: 1 scene, 6 elements, 4 colors in 0.5s vs 10-min AE timeout. Admin 'Quick scan (no AE)' is now the recommended path and passes the project mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,7 @@ export function ProjectScanImport({ projectId, onClose, onApplied }: {
|
||||
const runQuick = async () => {
|
||||
jobRef.current = null; // quick scan is synchronous — no timer/cancel
|
||||
setStep("scanning"); setErr(null); setStatusMsg("در حال خواندن ساختار پروژه از فایل AEP…");
|
||||
const r = await fetch(`/api/admin/resource/template-scans/${projectId}/quick`, { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" });
|
||||
const r = await fetch(`/api/admin/resource/template-scans/${projectId}/quick?mode=${encodeURIComponent(mode)}`, { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" });
|
||||
const d = await r.json().catch(() => null);
|
||||
if (!r.ok) { fail(d?.error ?? "اسکن سریع ناموفق بود (آیا فایل AEP آپلود شده؟)"); return; }
|
||||
await preview(d);
|
||||
@@ -135,12 +135,8 @@ export function ProjectScanImport({ projectId, onClose, onApplied }: {
|
||||
{step === "idle" && (
|
||||
<div className="space-y-3">
|
||||
<p className="text-sm text-gray-400">ساختار قالب را مستقیماً از فایل افترافکت بخوانید. ابتدا یک پیشنمایش از تغییرات میبینید و سپس اعمال میکنید (ویرایشهای دستی حفظ میشوند).</p>
|
||||
<button className="w-full rounded-lg border border-[#262b40] p-3 text-right hover:bg-[#161a2e]" onClick={runQuick}>
|
||||
<div className="text-sm font-medium text-white">اسکن سریع (بدون افترافکت)</div>
|
||||
<div className="mt-0.5 text-xs text-gray-500">فقط نام صحنهها و مدتها را از فایل AEP میخواند. فوری، بدون نیاز به نود. رنگها/فونتها بعداً با اسکن کامل پر میشوند.</div>
|
||||
</button>
|
||||
<div className="rounded-lg border border-[#262b40] p-3">
|
||||
<label className="mb-1 block text-xs text-gray-400">نوع پروژه (برای اسکن کامل)</label>
|
||||
<label className="mb-1 block text-xs text-gray-400">نوع پروژه</label>
|
||||
<select className="w-full rounded-lg border border-[#262b40] bg-[#0c0e1a] px-2.5 py-1.5 text-sm text-gray-100 outline-none focus:border-indigo-500" value={mode} onChange={(e) => setMode(e.target.value)}>
|
||||
<option value="fix">Fix — صحنهها از نام لایهها (frl_c1t1)</option>
|
||||
<option value="flexible">Flexible — هر صحنه یک کامپوزیشن</option>
|
||||
@@ -148,9 +144,13 @@ export function ProjectScanImport({ projectId, onClose, onApplied }: {
|
||||
<option value="musicvisualizer">Music Visualizer</option>
|
||||
</select>
|
||||
</div>
|
||||
<button className="w-full rounded-lg border border-emerald-500/30 bg-emerald-500/5 p-3 text-right hover:bg-emerald-500/10" onClick={runQuick}>
|
||||
<div className="text-sm font-medium text-white">اسکن سریع (بدون افترافکت) — پیشنهادی</div>
|
||||
<div className="mt-0.5 text-xs text-gray-500">صحنهها و عناصر (متن/مدیا) را مستقیماً از فایل AEP میخواند — فوری و بدون نیاز به نود، هیچوقت گیر نمیکند. مقادیر رنگ/فونت بعداً با اسکن کامل پر میشوند.</div>
|
||||
</button>
|
||||
<button className="w-full rounded-lg border border-[#262b40] p-3 text-right hover:bg-[#161a2e]" onClick={runFull}>
|
||||
<div className="text-sm font-medium text-white">اسکن کامل (روی نود افترافکت)</div>
|
||||
<div className="mt-0.5 text-xs text-gray-500">صحنهها، عناصر، فونتها، چینش و رنگها (frshare) را کامل میخواند. نیازمند یک نود افترافکت آنلاین است.</div>
|
||||
<div className="mt-0.5 text-xs text-gray-500">علاوه بر ساختار، مقدار فونتها، چینش و رنگها (frshare) را هم میخواند. کندتر و نیازمند یک نود افترافکت آنلاین است.</div>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user