diff --git a/README.md b/README.md index d98c749b..562625f9 100644 --- a/README.md +++ b/README.md @@ -136,11 +136,13 @@ summary: it works! you can use it! (but technically not even close to beta) ## hotkeys the browser has the following hotkeys -* `0..9` jump to 10%..90% -* `U/O` skip 10sec back/forward -* `J/L` prev/next song * `I/K` prev/next folder * `P` parent folder +* when playing audio: + * `0..9` jump to 10%..90% + * `U/O` skip 10sec back/forward + * `J/L` prev/next song + * `J` also starts playing the folder ## tree-mode @@ -399,7 +401,7 @@ these are standalone programs and will never be imported / evaluated by copypart # sfx -currently there are two self-contained binaries: +currently there are two self-contained "binaries": * [copyparty-sfx.py](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py) -- pure python, works everywhere * [copyparty-sfx.sh](https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.sh) -- smaller, but only for linux and macos diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 7eae76d4..745ff091 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1360,6 +1360,13 @@ class HttpCli(object): if "b" in self.uparam: tpl = "browser2" + logues = ["", ""] + for n, fn in enumerate([".prologue.html", ".epilogue.html"]): + fn = os.path.join(abspath, fn) + if os.path.exists(fsenc(fn)): + with open(fsenc(fn), "rb") as f: + logues[n] = f.read().decode("utf-8") + j2a = { "vdir": quotep(self.vpath), "vpnodes": vpnodes, @@ -1373,7 +1380,7 @@ class HttpCli(object): "have_zip": (not self.args.no_zip), "have_b_u": (self.writable and self.uparam.get("b") == "u"), "url_suf": url_suf, - "logues": ["", ""], + "logues": logues, "title": html_escape(self.vpath, crlf=True), "srv_info": srv_info, } @@ -1526,13 +1533,6 @@ class HttpCli(object): for f in dirs: f["tags"] = {} - logues = ["", ""] - for n, fn in enumerate([".prologue.html", ".epilogue.html"]): - fn = os.path.join(abspath, fn) - if os.path.exists(fsenc(fn)): - with open(fsenc(fn), "rb") as f: - logues[n] = f.read().decode("utf-8") - if is_ls: [x.pop(k) for k in ["name", "dt"] for y in [dirs, files] for x in y] ret = {