2 Commits

Author SHA1 Message Date
b7c25525a1 catch ConnectionRefusedError as well as TimeoutError
patch bump
2025-06-30 07:44:23 +01:00
c39b909d11 fix gui --theme example 2025-06-30 07:04:33 +01:00
7 changed files with 7 additions and 7 deletions

View File

@@ -109,7 +109,7 @@ Just enter the filename and click *Start*.
You can change the colour theme with the --theme option: You can change the colour theme with the --theme option:
```console ```console
simple-recorder --theme="Light Purple" simple-recorder-gui --theme="Light Purple"
``` ```
[obs-studio]: https://obsproject.com/ [obs-studio]: https://obsproject.com/

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "simple-recorder" name = "simple-recorder"
version = "0.3.4" version = "0.3.5"
description = "A simple OBS recorder" description = "A simple OBS recorder"
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }] authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
dependencies = [ dependencies = [

View File

@@ -32,5 +32,5 @@ class Directory(Command):
f"Current recording directory: {highlight(resp.record_directory)}" f"Current recording directory: {highlight(resp.record_directory)}"
) )
return resp.record_directory return resp.record_directory
except TimeoutError: except (ConnectionRefusedError, TimeoutError):
raise SimpleRecorderError("Failed to connect to OBS. Is it running?") raise SimpleRecorderError("Failed to connect to OBS. Is it running?")

View File

@@ -26,5 +26,5 @@ class Pause(Command):
client.pause_record() client.pause_record()
print("Recording paused successfully.") print("Recording paused successfully.")
except TimeoutError: except (ConnectionRefusedError, TimeoutError):
raise SimpleRecorderError("Failed to connect to OBS. Is it running?") raise SimpleRecorderError("Failed to connect to OBS. Is it running?")

View File

@@ -26,5 +26,5 @@ class Resume(Command):
client.resume_record() client.resume_record()
print("Recording resumed successfully.") print("Recording resumed successfully.")
except TimeoutError: except (ConnectionRefusedError, TimeoutError):
raise SimpleRecorderError("Failed to connect to OBS. Is it running?") raise SimpleRecorderError("Failed to connect to OBS. Is it running?")

View File

@@ -45,5 +45,5 @@ class Start(Command):
) )
client.start_record() client.start_record()
print(f"Recording started with filename: {highlight(filename)}") print(f"Recording started with filename: {highlight(filename)}")
except TimeoutError: except (ConnectionRefusedError, TimeoutError):
raise SimpleRecorderError("Failed to connect to OBS. Is it running?") raise SimpleRecorderError("Failed to connect to OBS. Is it running?")

View File

@@ -25,5 +25,5 @@ class Stop(Command):
client.stop_record() client.stop_record()
print(highlight("Recording stopped successfully.")) print(highlight("Recording stopped successfully."))
except TimeoutError: except (ConnectionRefusedError, TimeoutError):
raise SimpleRecorderError("Failed to connect to OBS. Is it running?") raise SimpleRecorderError("Failed to connect to OBS. Is it running?")