optimize clearTimeout + always shrink upload panes after completion + fix GET alignment

This commit is contained in:
ed 2023-05-12 20:46:45 +00:00
parent e64b87b99b
commit d979c47f50
3 changed files with 6 additions and 3 deletions

View File

@ -726,7 +726,7 @@ class HttpCli(object):
def handle_get(self) -> bool: def handle_get(self) -> bool:
if self.do_log: if self.do_log:
logmsg = "%4s %s @%s" % (self.mode, self.req, self.uname) logmsg = "%-4s %s @%s" % (self.mode, self.req, self.uname)
if "range" in self.headers: if "range" in self.headers:
try: try:

View File

@ -1974,7 +1974,10 @@ var pbar = (function () {
w = 8, w = 8,
apos, adur; apos, adur;
clearTimeout(t_redraw); if (t_redraw) {
clearTimeout(t_redraw);
t_redraw = 0;
}
pctx.clearRect(0, 0, pc.w, pc.h); pctx.clearRect(0, 0, pc.w, pc.h);
if (!mp || !mp.au || !isNum(adur = mp.au.duration) || !isNum(apos = mp.au.currentTime) || apos < 0 || adur < apos) if (!mp || !mp.au || !isNum(adur = mp.au.duration) || !isNum(apos = mp.au.currentTime) || apos < 0 || adur < apos)

View File

@ -1826,7 +1826,7 @@ function up2k_init(subtle) {
timer.rm(etafun); timer.rm(etafun);
timer.rm(donut.do); timer.rm(donut.do);
utw_minh = 0; utw_minh = utw_read = 0;
} }
function chill(t) { function chill(t) {