Skip to content

Commit 141c71f

Browse files
committed
obs_cr/control: Delay mirroring the playing state (solves race condition)
- The websocket JSON state file in OBS got corrupted, and it seems to be because multiple processes were writing it too quickly. This delay seemed to make things better.
1 parent 6271980 commit 141c71f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

obs_cr/control.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def update_(self, name, value):
466466
if any(self.state.values()):
467467
self.configure(background=self.color, activebackground=self.color)
468468
if cli_args.broadcaster:
469-
obs['mirror-live'] = self.state
469+
self.after(150, obs.__setattr__, 'mirror-live', self.state)
470470
else:
471471
self.configure(background=default_color, activebackground=default_color)
472472
if cli_args.broadcaster:

0 commit comments

Comments
 (0)