mirror of
https://github.com/thunderheronight/splat-workshop.git
synced 2026-10-17 16:02:30 +02:00
Configurable video player for "Open in video player"
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a4c7cd43e8
commit
4cb73f70ce
3 files changed
+8
-1
No files matched your search
@@ -23,6 +23,10 @@ runs = "~/SplatWorkshop/runs"
|
||||
# Additional folders that are scanned for *_stereo.mp4 recordings.
|
||||
extra_recording_dirs = ["~/Downloads", "~/Videos"]
|
||||
|
||||
# Program for "Open in video player", e.g. "mpv" or "vlc --fullscreen".
|
||||
# Leave empty to use the system default for MP4 files.
|
||||
video_player = ""
|
||||
|
||||
[frame]
|
||||
# SSH target of your Steam Frame. Leave empty to work without the Frame
|
||||
# (no downloading of recordings, no copying into the Gaussian XR gallery).
|
||||
|
||||
@@ -25,6 +25,7 @@ DEFAULTS = {
|
||||
"recordings": "~/SplatWorkshop/recordings",
|
||||
"runs": "~/SplatWorkshop/runs",
|
||||
"extra_recording_dirs": ["~/Downloads", "~/Videos"],
|
||||
"video_player": "",
|
||||
},
|
||||
"frame": {"host": ""},
|
||||
"server": {"port": 8771, "lan": False, "idle_minutes": 20, "language": "auto"},
|
||||
@@ -48,6 +49,8 @@ class Config:
|
||||
self.recordings = path(p["recordings"])
|
||||
self.runs = path(p["runs"])
|
||||
self.extra_recording_dirs = [path(d) for d in p.get("extra_recording_dirs", [])]
|
||||
# Command for "Open in video player" (e.g. "mpv"); empty = system default via xdg-open
|
||||
self.video_player = shlex.split(p.get("video_player", "")) or ["xdg-open"]
|
||||
self.frame_host = os.environ.get("FRAME_HOST", f.get("host", "")).strip()
|
||||
self.port = int(os.environ.get("SPLAT_PORT", s["port"]))
|
||||
lan = os.environ.get("SPLAT_LAN")
|
||||
|
||||
@@ -860,7 +860,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
if not local:
|
||||
e = err("err.not_local")
|
||||
else:
|
||||
subprocess.Popen(["xdg-open", local], start_new_session=True,
|
||||
subprocess.Popen([*CFG.video_player, local], start_new_session=True,
|
||||
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
elif path == "/api/open":
|
||||
d = scene_dir(p.get("slug", ""))
|
||||
|
||||
Reference in new issue
Block a user