fix(assets): live-path no longer gates on removed global growing_enabled
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 <noreply@anthropic.com>
This commit is contained in:
parent
5968d4f681
commit
e0e0b83810
1 changed files with 6 additions and 3 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue