Fix active source detection by including team names in lookup
- Update streams API to join with teams table and return StreamWithTeam data - Modify stream lookup maps to generate proper stream group names with team prefixes - Format: {team_name}_{stream_name}_stream to match obsClient.js logic - Update type signatures throughout to support team_name and group_name fields - Now properly matches text file contents with database streams for dropdown selection 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5dd9707f13
commit
f9363eac20
3 changed files with 20 additions and 14 deletions
|
@ -7,17 +7,12 @@ import { useToast } from '@/lib/useToast';
|
|||
import { ToastContainer } from '@/components/Toast';
|
||||
import { useActiveSourceLookup, useDebounce, PerformanceMonitor } from '@/lib/performance';
|
||||
|
||||
type Stream = {
|
||||
id: number;
|
||||
name: string;
|
||||
obs_source_name: string;
|
||||
url: string;
|
||||
};
|
||||
import { StreamWithTeam } from '@/types';
|
||||
|
||||
type ScreenType = 'large' | 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
||||
|
||||
export default function Home() {
|
||||
const [streams, setStreams] = useState<Stream[]>([]);
|
||||
const [streams, setStreams] = useState<StreamWithTeam[]>([]);
|
||||
const [activeSources, setActiveSources] = useState<Record<ScreenType, string | null>>({
|
||||
large: null,
|
||||
left: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue