From ea4441e25c43a5c0483342589f45f56c7a9f24f9 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 1 Jun 2021 02:47:37 +0200 Subject: [PATCH] v0.11.2 --- copyparty/__version__.py | 4 ++-- copyparty/up2k.py | 5 +++-- copyparty/web/browser.js | 8 +++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/copyparty/__version__.py b/copyparty/__version__.py index 84b282b0..f677a5c7 100644 --- a/copyparty/__version__.py +++ b/copyparty/__version__.py @@ -1,8 +1,8 @@ # coding: utf-8 -VERSION = (0, 11, 1) +VERSION = (0, 11, 2) CODENAME = "the grid" -BUILD_DT = (2021, 5, 29) +BUILD_DT = (2021, 6, 1) S_VERSION = ".".join(map(str, VERSION)) S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT) diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 9aed45b8..a3bd3713 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -1244,13 +1244,14 @@ class Up2k(object): return wark def _hashlist_from_file(self, path): + pp = self.pp if hasattr(self, "pp") else None fsz = os.path.getsize(fsenc(path)) csz = up2k_chunksize(fsz) ret = [] with open(fsenc(path), "rb", 512 * 1024) as f: while fsz > 0: - if self.pp: - self.pp.msg = "{} MB, {}".format(int(fsz / 1024 / 1024), path) + if pp: + pp.msg = "{} MB, {}".format(int(fsz / 1024 / 1024), path) hashobj = hashlib.sha512() rem = min(csz, fsz) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 5f1b56f4..9897b164 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -811,9 +811,6 @@ var thegrid = (function () { if (e && e.ctrlKey) return true; - if (QS('#ggrid a[ref="unsearch"]')) - return ebi('unsearch').click(); - ev(e); var oth = ebi(this.getAttribute('ref')), td = oth.parentNode.nextSibling, @@ -829,6 +826,11 @@ var thegrid = (function () { ths[a].onclick = r.sel ? seltgl : null; ths[a].setAttribute('class', ebi(ths[a].getAttribute('ref')).parentNode.parentNode.getAttribute('class')); } + var uns = QS('#ggrid a[ref="unsearch"]'); + if (uns) + uns.onclick = function () { + ebi('unsearch').click(); + }; } function loadgrid() {