Initial commit

This commit is contained in:
oitsjustjose 2022-11-05 19:09:06 -05:00
commit afda90bb0e
16 changed files with 396 additions and 0 deletions

28
obs_hook.py Normal file
View file

@ -0,0 +1,28 @@
import json
status = {"STREAMING": False, "RECORDING": False}
def on_event(event):
if event == obspython.OBS_FRONTEND_EVENT_RECORDING_STARTED:
status["RECORDING"] = True
__write()
if event == obspython.OBS_FRONTEND_EVENT_RECORDING_STOPPED:
status["RECORDING"] = False
__write()
if event == obspython.OBS_FRONTEND_EVENT_STREAMING_STARTED:
status["STREAMING"] = True
__write()
if event == obspython.OBS_FRONTEND_EVENT_STREAMING_STOPPED:
status["STREAMING"] = False
__write()
def __write():
with open("C:\\Users\\Jose\\Documents\\Tidbyt\\status", "w") as fh:
fh.write(json.dumps(status))
def script_load(settings):
__write()
obspython.obs_frontend_add_event_callback(on_event)