mirror of
https://github.com/onyx-and-iris/simple-recorder.git
synced 2026-04-09 02:43:34 +00:00
set timeout for directory command
initialise current_directory to empty value if the request fails. patch bump
This commit is contained in:
@@ -21,7 +21,7 @@ class Directory(Command):
|
||||
async def run(self):
|
||||
try:
|
||||
with obsws.ReqClient(
|
||||
host=self.host, port=self.port, password=self.password
|
||||
host=self.host, port=self.port, password=self.password, timeout=3
|
||||
) as client:
|
||||
if self.directory:
|
||||
client.set_record_directory(self.directory)
|
||||
|
||||
@@ -31,6 +31,7 @@ class SimpleRecorderWindow(fsg.Window):
|
||||
current_directory = resp.record_directory
|
||||
except (ConnectionRefusedError, TimeoutError):
|
||||
status_message = "Failed to connect to OBS. Is it running?"
|
||||
current_directory = ""
|
||||
|
||||
recorder_layout = [
|
||||
[fsg.Text("Enter recording filename:", key="-PROMPT-")],
|
||||
|
||||
Reference in New Issue
Block a user