diff --git a/copyparty/up2k.py b/copyparty/up2k.py index c369fcaa..d425a8c9 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -2315,7 +2315,7 @@ class Up2k(object): flt = job["life"] vfs = self.asrv.vfs.all_vols[job["vtop"]] vlt = vfs.flags["lifetime"] - if vlt and flt < vlt: + if vlt and flt > 1 and flt < vlt: upt -= vlt - flt wake_sr = True t = "using client lifetime; at={:.0f} ({}-{})" diff --git a/copyparty/web/baguettebox.js b/copyparty/web/baguettebox.js index 4c6ef35b..0a826ca4 100644 --- a/copyparty/web/baguettebox.js +++ b/copyparty/web/baguettebox.js @@ -246,12 +246,18 @@ window.baguetteBox = (function () { } function keyDownHandler(e) { - if (e.ctrlKey || e.altKey || e.metaKey || e.isComposing || modal.busy) + if (anymod(e, true) || modal.busy) return; var k = e.code + '', v = vid(), pos = -1; - if (k == "ArrowLeft" || k == "KeyJ") + if (k == "BracketLeft") + setloop(1); + else if (k == "BracketRight") + setloop(2); + else if (e.shiftKey) + return; + else if (k == "ArrowLeft" || k == "KeyJ") showPreviousImage(); else if (k == "ArrowRight" || k == "KeyL") showNextImage(); @@ -289,10 +295,6 @@ window.baguetteBox = (function () { rotn(e.shiftKey ? -1 : 1); else if (k == "KeyY") dlpic(); - else if (k == "BracketLeft") - setloop(1); - else if (k == "BracketRight") - setloop(2); } function anim() { @@ -406,7 +408,7 @@ window.baguetteBox = (function () { } function keyUpHandler(e) { - if (e.ctrlKey || e.altKey || e.metaKey || e.isComposing) + if (anymod(e)) return; var k = e.code + ''; diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index ac4370cb..65299a16 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -2497,7 +2497,7 @@ function up2k_init(subtle) { tt.att(QS('#u2conf')); function bumpthread2(e) { - if (e.ctrlKey || e.altKey || e.metaKey || e.isComposing) + if (anymod(e)) return; if (e.code == 'ArrowUp') @@ -2571,6 +2571,7 @@ function up2k_init(subtle) { el.innerHTML = '