Major enhancements to stream management and UI improvements #6

Merged
deco merged 4 commits from stream-management-enhancements into main 2025-07-21 05:49:02 +03:00
Showing only changes of commit 43ce6534a5 - Show all commits

View file

@ -3,6 +3,18 @@ import { getDatabase } from '../../../lib/database';
import { TABLE_NAMES } from '../../../lib/constants'; import { TABLE_NAMES } from '../../../lib/constants';
import { getOBSClient } from '../../../lib/obsClient'; import { getOBSClient } from '../../../lib/obsClient';
// System scenes that should not be considered orphaned
// These are infrastructure scenes that contain source switchers or other system components
const SYSTEM_SCENES: string[] = [
'1-Screen',
'2-Screen',
'4-Screen',
'Starting',
'Ending',
'Audio',
'Movies'
];
interface OBSScene { interface OBSScene {
sceneName: string; sceneName: string;
sceneUuid: string; sceneUuid: string;
@ -70,7 +82,8 @@ export async function GET() {
missing_in_obs: verification.filter(team => !team.exists_in_obs), missing_in_obs: verification.filter(team => !team.exists_in_obs),
name_mismatches: verification.filter(team => team.name_changed), name_mismatches: verification.filter(team => team.name_changed),
orphaned_in_obs: obsScenes.filter(scene => orphaned_in_obs: obsScenes.filter(scene =>
!teams.some(team => team.group_uuid === scene.sceneUuid || team.group_name === scene.sceneName) !teams.some(team => team.group_uuid === scene.sceneUuid || team.group_name === scene.sceneName) &&
!SYSTEM_SCENES.includes(scene.sceneName)
).map(s => ({ name: s.sceneName, uuid: s.sceneUuid })) ).map(s => ({ name: s.sceneName, uuid: s.sceneUuid }))
} }
}); });