From e0e0b83810381b89473a3c3f281e0b776a308ddc Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Sun, 31 May 2026 15:05:06 -0400 Subject: [PATCH] fix(assets): live-path no longer gates on removed global growing_enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Growing-files mode became per-recorder (recorders.growing_enabled); the global growing_enabled setting was removed. GET /assets/:id/live-path — which the Premiere plugin calls to mount a still-growing master — still required growing_enabled==='true', so Mount Live would 409 "Growing-files mode is disabled" on any deploy where that stale key isn't set. Drop the global gate: a status='live' asset already proves a growing recorder is producing the file; only the editor-facing growing_smb_url is required. Response contract is unchanged, so the plugin needs no update. Co-Authored-By: Claude Opus 4.8 --- services/mam-api/src/routes/assets.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/services/mam-api/src/routes/assets.js b/services/mam-api/src/routes/assets.js index 038df5c..8e3463d 100644 --- a/services/mam-api/src/routes/assets.js +++ b/services/mam-api/src/routes/assets.js @@ -734,11 +734,14 @@ router.get('/:id/live-path', async (req, res, next) => { if (a.rows.length === 0) return res.status(404).json({ error: 'Asset not found' }); const asset = a.rows[0]; if (asset.status !== 'live') return res.status(409).json({ error: 'Asset is not currently growing', status: asset.status }); - const s = await pool.query(`SELECT key, value FROM settings WHERE key IN ('growing_enabled','growing_smb_url')`); + // Growing-files mode is now per-recorder (recorders.growing_enabled), so we + // no longer gate on the removed global `growing_enabled` setting. A + // status='live' asset already proves a growing recorder is producing this + // file; we only need the editor-facing SMB URL to build the UNC path. + const s = await pool.query(`SELECT key, value FROM settings WHERE key = 'growing_smb_url'`); const cfg = {}; for (const { key, value } of s.rows) cfg[key] = value; - if (cfg.growing_enabled !== 'true') return res.status(409).json({ error: 'Growing-files mode is disabled' }); - if (!cfg.growing_smb_url) return res.status(409).json({ error: 'No SMB URL configured — set growing_smb_url in Settings' }); + if (!cfg.growing_smb_url) return res.status(409).json({ error: 'No SMB URL configured — set the editor SMB URL in Settings → Storage' }); const rec = await pool.query( `SELECT recording_container FROM recorders WHERE current_session_id = $1 ORDER BY updated_at DESC LIMIT 1`, [asset.id]