feat: add bitrateMatrixOverrides to types, schema, and migration
This commit is contained in:
@@ -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' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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 ──────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user