Select the single active video profile through endpoint publication
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user