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]