Select the single active video profile through endpoint publication

This commit is contained in:
Mikei386
2026-09-29 13:16:41 +02:00
parent 7d6facaefa
commit e851b2f3ea
8 changed files with 33 additions and 12 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ class Video:
with self.lock:
if self.mode!='llm' or self.state=='switching':raise ValueError('Videoprofil nur im LLM-Modus wechseln.')
p=next((p for p in self.profiles.status()['profiles'] if p['id']==ident and p['kind']=='video'),None)
if not p:raise ValueError('Videoprofil nicht gefunden.')
if ident is not None and not p:raise ValueError('Videoprofil nicht gefunden.')
self.root.mkdir(parents=True,exist_ok=True,mode=0o700)
tmp=self.root/'selection.tmp';tmp.write_text(json.dumps({'profile_id':ident}));tmp.replace(self.root/'selection.json');self.selected=ident
return self.status()