feat: wire allowCustomBitrate through rowToLimits and PATCH handler in settings route
This commit is contained in:
@@ -32,6 +32,7 @@ function rowToLimits(row: typeof schema.instanceSettings.$inferSelect): Instance
|
|||||||
return Object.keys(parsed).length > 0 ? parsed as Record<string, number> : null;
|
return Object.keys(parsed).length > 0 ? parsed as Record<string, number> : null;
|
||||||
} catch { return 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;
|
updateData.discoveryEnabled = body.discoveryEnabled ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (body.allowCustomBitrate !== undefined) {
|
||||||
|
updateData.allowCustomBitrate = body.allowCustomBitrate ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (body.bitrateMatrixOverrides !== undefined) {
|
if (body.bitrateMatrixOverrides !== undefined) {
|
||||||
if (body.bitrateMatrixOverrides === null) {
|
if (body.bitrateMatrixOverrides === null) {
|
||||||
updateData.bitrateMatrixOverrides = null;
|
updateData.bitrateMatrixOverrides = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user