diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 925c9738..9bd9e1e2 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1077,7 +1077,12 @@ class HttpCli(object): dt = datetime.utcfromtimestamp(inf.st_mtime) dt = dt.strftime("%Y-%m-%d %H:%M:%S") - item = [margin, quotep(href), html_escape(fn), sz, dt] + try: + ext = "---" if is_dir else fn.rsplit(".", 1)[1] + except: + ext = "%" + + item = [margin, quotep(href), html_escape(fn), sz, ext, dt] if is_dir: dirs.append(item) else: diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index 6235dcac..cc023a81 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -34,13 +34,14 @@ File Name File Size + T Date {%- for f in files %} -{{ f[0] }}{{ f[2] }}{{ f[3] }}{{ f[4] }} +{{ f[0] }}{{ f[2] }}{{ f[3] }}{{ f[4] }}{{ f[5] }} {%- endfor %} diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 05f8bcd6..2871de4d 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -617,8 +617,8 @@ function unblocked() { // show ui to manually start playback of a linked song function autoplay_blocked(tid) { show_modal( - '
' + - '
Cancel
(show file list)
'); + '
' + + '
Cancel
(show file list)
'); var go = o('blk_go'); var na = o('blk_na'); @@ -627,7 +627,8 @@ function autoplay_blocked(tid) { fn = decodeURIComponent(fn.replace(/\+/g, ' ')); go.textContent = 'Play "' + fn + '"'; - go.onclick = function () { + go.onclick = function (e) { + if (e) e.preventDefault(); unblocked(); mp.au.play(); };