feat: add bitrateMatrixOverrides to types, schema, and migration

This commit is contained in:
Jannis Braun
2026-03-22 00:42:23 +01:00
parent c7c7793aef
commit 267dc8d992
4 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -79,7 +79,8 @@ export function runMigrations(db: Database.Database): void {
{ name: 'instance_name', type: "TEXT DEFAULT 'Backspace'" }, { name: 'instance_name', type: "TEXT DEFAULT 'Backspace'" },
{ name: 'worker_id', type: 'INTEGER' }, { name: 'worker_id', type: 'INTEGER' },
{ name: 'discovery_enabled', type: 'INTEGER NOT NULL DEFAULT 1' }, { name: 'discovery_enabled', type: 'INTEGER NOT NULL DEFAULT 1' },
{ name: 'registration_open', type: 'INTEGER' } { name: 'registration_open', type: 'INTEGER' },
{ name: 'bitrate_matrix_overrides', type: 'TEXT DEFAULT NULL' }
] ]
}, },
{ {
+1
View File
@@ -258,6 +258,7 @@ export const instanceSettings = sqliteTable('instance_settings', {
maxFramerate: integer('max_framerate').notNull().default(60), maxFramerate: integer('max_framerate').notNull().default(60),
registrationOpen: integer('registration_open'), // null = use env var default, 0/1 = explicit registrationOpen: integer('registration_open'), // null = use env var default, 0/1 = explicit
gifApiKey: text('gif_api_key'), gifApiKey: text('gif_api_key'),
bitrateMatrixOverrides: text('bitrate_matrix_overrides'),
updatedAt: integer('updated_at').notNull(), updatedAt: integer('updated_at').notNull(),
}); });
+1
View File
@@ -616,6 +616,7 @@ export interface InstanceStreamingLimits {
maxResolution: number; maxResolution: number;
maxFramerate: number; maxFramerate: number;
discoveryEnabled: boolean; discoveryEnabled: boolean;
bitrateMatrixOverrides: Record<string, number> | null;
} }
// ─── Federation Types ────────────────────────────────────────────────────── // ─── Federation Types ──────────────────────────────────────────────────────
+1
View File
@@ -24,6 +24,7 @@ const DEFAULT_LIMITS: InstanceStreamingLimits = {
maxResolution: 1080, maxResolution: 1080,
maxFramerate: 60, maxFramerate: 60,
discoveryEnabled: true, discoveryEnabled: true,
bitrateMatrixOverrides: null,
}; };
export function getStreamingLimits(): InstanceStreamingLimits { export function getStreamingLimits(): InstanceStreamingLimits {