Add system scene exclusion list to prevent infrastructure scenes from showing as orphaned
All checks were successful
Lint and Build / build (pull_request) Successful in 2m54s
All checks were successful
Lint and Build / build (pull_request) Successful in 2m54s
- Added SYSTEM_SCENES array with hardcoded list of infrastructure scenes - Updated orphaned groups detection to exclude these system scenes - Prevents scenes containing source switchers from being flagged as orphaned - Includes common infrastructure scenes: 1-Screen, 2-Screen, 4-Screen, Starting, Ending, Audio, Movies This ensures that OBS infrastructure scenes are not managed by the app and won't show up as orphaned groups in the UI. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b5933fc6bb
commit
43ce6534a5
1 changed files with 14 additions and 1 deletions
|
@ -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 }))
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue