feat: wire allowCustomBitrate through rowToLimits and PATCH handler in settings route

This commit is contained in:
Jannis Braun
2026-03-25 04:05:48 +01:00
parent f02cb4e52a
commit b4582a53f1
+5
View File
@@ -32,6 +32,7 @@ function rowToLimits(row: typeof schema.instanceSettings.$inferSelect): Instance
return Object.keys(parsed).length > 0 ? parsed as Record<string, number> : null;
} catch { return null; }
})(),
allowCustomBitrate: row.allowCustomBitrate === 1,
};
}
@@ -119,6 +120,10 @@ export async function settingsRoutes(app: FastifyInstance): Promise<void> {
updateData.discoveryEnabled = body.discoveryEnabled ? 1 : 0;
}
if (body.allowCustomBitrate !== undefined) {
updateData.allowCustomBitrate = body.allowCustomBitrate ? 1 : 0;
}
if (body.bitrateMatrixOverrides !== undefined) {
if (body.bitrateMatrixOverrides === null) {
updateData.bitrateMatrixOverrides = null;