mirror of
https://github.com/onyx-and-iris/simple-recorder.git
synced 2026-04-21 00:33:36 +00:00
Compare commits
2 Commits
6035e09e43
...
v0.3.3
| Author | SHA1 | Date | |
|---|---|---|---|
| d0401d0457 | |||
| 8813c25819 |
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "simple-recorder"
|
name = "simple-recorder"
|
||||||
version = "0.3.1"
|
version = "0.3.3"
|
||||||
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 = [
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class Directory(Command):
|
|||||||
async def run(self):
|
async def run(self):
|
||||||
try:
|
try:
|
||||||
with obsws.ReqClient(
|
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:
|
) as client:
|
||||||
if self.directory:
|
if self.directory:
|
||||||
client.set_record_directory(self.directory)
|
client.set_record_directory(self.directory)
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class SimpleRecorderWindow(fsg.Window):
|
|||||||
current_directory = resp.record_directory
|
current_directory = resp.record_directory
|
||||||
except (ConnectionRefusedError, TimeoutError):
|
except (ConnectionRefusedError, TimeoutError):
|
||||||
status_message = "Failed to connect to OBS. Is it running?"
|
status_message = "Failed to connect to OBS. Is it running?"
|
||||||
|
current_directory = ""
|
||||||
|
|
||||||
recorder_layout = [
|
recorder_layout = [
|
||||||
[fsg.Text("Enter recording filename:", key="-PROMPT-")],
|
[fsg.Text("Enter recording filename:", key="-PROMPT-")],
|
||||||
@@ -102,6 +103,9 @@ class SimpleRecorderWindow(fsg.Window):
|
|||||||
self["Add Chapter"].bind("<Leave>", " || LEAVE")
|
self["Add Chapter"].bind("<Leave>", " || LEAVE")
|
||||||
self["Add Chapter"].bind("<Button-3>", " || RIGHT_CLICK")
|
self["Add Chapter"].bind("<Button-3>", " || RIGHT_CLICK")
|
||||||
|
|
||||||
|
self["-GET-CURRENT-"].bind("<Return>", " || RETURN")
|
||||||
|
self["-UPDATE-"].bind("<Return>", " || RETURN")
|
||||||
|
|
||||||
async def run(self):
|
async def run(self):
|
||||||
while True:
|
while True:
|
||||||
event, values = self.read()
|
event, values = self.read()
|
||||||
@@ -185,7 +189,7 @@ class SimpleRecorderWindow(fsg.Window):
|
|||||||
"This feature is not implemented yet", text_color="orange"
|
"This feature is not implemented yet", text_color="orange"
|
||||||
)
|
)
|
||||||
|
|
||||||
case ["-GET-CURRENT-"]:
|
case ["-GET-CURRENT-"] | ["-GET-CURRENT-", "RETURN"]:
|
||||||
try:
|
try:
|
||||||
current_directory = await Directory(
|
current_directory = await Directory(
|
||||||
host=self.host, port=self.port, password=self.password
|
host=self.host, port=self.port, password=self.password
|
||||||
@@ -196,7 +200,7 @@ class SimpleRecorderWindow(fsg.Window):
|
|||||||
f"Error: {e.raw_message}", text_color="red"
|
f"Error: {e.raw_message}", text_color="red"
|
||||||
)
|
)
|
||||||
|
|
||||||
case ["-UPDATE-"]:
|
case ["-UPDATE-"] | ["-UPDATE-", "RETURN"]:
|
||||||
filepath = values["-FILEPATH-"]
|
filepath = values["-FILEPATH-"]
|
||||||
if not filepath:
|
if not filepath:
|
||||||
self["-OUTPUT-SETTINGS-"].update(
|
self["-OUTPUT-SETTINGS-"].update(
|
||||||
|
|||||||
Reference in New Issue
Block a user