Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ducktrack/obs_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import time
from platform import system

from obsws_python.error import OBSSDKRequestError
import obsws_python as obs
import psutil

Expand Down Expand Up @@ -149,9 +150,9 @@ def on_record_state_changed(data):

try:
self.req_client.set_input_mute("Mic/Aux", muted=True)
except obs.error.OBSSDKRequestError :
# In case there is no Mic/Aux input, this will throw an error
except OBSSDKRequestError:
pass
# In case there is no Mic/Aux input, this will throw an error

def start_recording(self):
self.req_client.start_record()
Expand Down Expand Up @@ -197,4 +198,4 @@ def _scale_resolution(base_width: int, base_height: int, target_width: int, tar
scaled_height = int((target_area / aspect_ratio) ** 0.5)
scaled_width = int(aspect_ratio * scaled_height)

return scaled_width, scaled_height
return scaled_width, scaled_height