mirror of
https://github.com/onyx-and-iris/simple-recorder.git
synced 2025-07-27 06:11:59 +00:00
set timeout for directory command
initialise current_directory to empty value if the request fails. patch bump
This commit is contained in:
parent
6035e09e43
commit
8813c25819
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "simple-recorder"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
description = "A simple OBS recorder"
|
||||
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
||||
dependencies = [
|
||||
|
@ -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-")],
|
||||
|
Loading…
x
Reference in New Issue
Block a user