diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py
index 6fe2376a..b29b9398 100644
--- a/copyparty/httpcli.py
+++ b/copyparty/httpcli.py
@@ -1268,7 +1268,7 @@ class HttpCli(object):
srv_info = " /// ".join(srv_info)
if is_ls:
- [x.pop("name") for y in [dirs, files] for x in y]
+ [x.pop(k) for k in ["name", "dt"] for y in [dirs, files] for x in y]
ret = json.dumps({"dirs": dirs, "files": files, "srvinf": srv_info})
self.reply(ret.encode("utf-8", "replace"), mime="application/json")
return True
diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js
index 5a29db4f..dc20c2c5 100644
--- a/copyparty/web/browser.js
+++ b/copyparty/web/browser.js
@@ -668,14 +668,12 @@ function autoplay_blocked() {
ext = rp.lastIndexOf('.') > 0 ? rp.split('.').slice(-1)[0] : '%',
links = linksplit(rp);
- ts = new Date(ts * 1000).toISOString().replace("T", " ").slice(0, -5);
-
if (ext.length > 8)
ext = '%';
links = links.join('');
html.push('- | ' + links + ' | ' + sz +
- ' | ' + ext + ' | ' + ts + ' |
');
+ '
' + ext + ' | ' + unix2iso(ts) + ' | ');
}
ofiles.tBodies[0].innerHTML = html.join('\n');
@@ -748,7 +746,8 @@ function autoplay_blocked() {
}
else {
html = '-' + esc(name) + "" + html;
+ esc(top) + '">' + esc(name) +
+ "\n";
var links = document.querySelectorAll('#tree a+a');
for (var a = 0, aa = links.length; a < aa; a++) {
@@ -792,7 +791,8 @@ function autoplay_blocked() {
function treego(e) {
ev(e);
- if (this.getAttribute('class') == 'hl') {
+ if (this.getAttribute('class') == 'hl' &&
+ this.previousSibling.textContent == '-') {
treegrow.call(this.previousSibling, e);
return;
}
@@ -810,8 +810,8 @@ function autoplay_blocked() {
while (this.nextSibling.nextSibling) {
var rm = this.nextSibling.nextSibling;
rm.parentNode.removeChild(rm);
- this.textContent = '+';
}
+ this.textContent = '+';
return;
}
var dst = this.getAttribute('dst');
@@ -835,7 +835,7 @@ function autoplay_blocked() {
return;
}
- ebi('srv_info').innerHTML = res.srvinf;
+ ebi('srv_info').innerHTML = '' + res.srvinf + '';
var nodes = res.dirs.concat(res.files);
var top = this.top;
var html = [];
@@ -844,7 +844,7 @@ function autoplay_blocked() {
ln = '' + r.lead + ' | ' + esc(decodeURIComponent(r.href)) + '';
- ln = [ln, r.sz, r.ext, r.dt].join(' | ');
+ ln = [ln, r.sz, r.ext, unix2iso(r.ts)].join(' | ');
html.push(ln + ' |
');
}
html = html.join('\n');
diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js
index 4dc57260..224594ba 100644
--- a/copyparty/web/up2k.js
+++ b/copyparty/web/up2k.js
@@ -756,8 +756,8 @@ function up2k_init(have_crypto) {
smsg = 'found';
var hit = response[0],
msg = linksplit(hit.rp).join(''),
- tr = new Date(hit.ts * 1000).toISOString().replace("T", " ").slice(0, -5),
- tu = new Date(t.lmod * 1000).toISOString().replace("T", " ").slice(0, -5),
+ tr = unix2iso(hit.ts),
+ tu = unix2iso(t.lmod),
diff = parseInt(t.lmod) - parseInt(hit.ts),
cdiff = (Math.abs(diff) <= 2) ? '3c0' : 'f0b',
sdiff = 'diff ' + diff;
diff --git a/copyparty/web/util.js b/copyparty/web/util.js
index a52a198d..090df390 100644
--- a/copyparty/web/util.js
+++ b/copyparty/web/util.js
@@ -214,3 +214,8 @@ function get_evpath() {
function get_vpath() {
return decodeURIComponent(get_evpath());
}
+
+
+function unix2iso(ts) {
+ return new Date(ts * 1000).toISOString().replace("T", " ").slice(0, -5);
+}
\ No newline at end of file