mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
good stuff
This commit is contained in:
parent
b2de1459b6
commit
50d8ff95ae
|
@ -1367,6 +1367,9 @@ class HttpCli(object):
|
|||
try:
|
||||
fs_path = req_path + ext
|
||||
st = bos.stat(fs_path)
|
||||
if stat.S_ISDIR(st.st_mode):
|
||||
continue
|
||||
|
||||
file_ts = max(file_ts, st.st_mtime)
|
||||
editions[ext or "plain"] = [fs_path, st.st_size]
|
||||
except:
|
||||
|
@ -1959,6 +1962,13 @@ class HttpCli(object):
|
|||
fmt = "{{}} {{:{},}} {{}}"
|
||||
nfmt = "{:,}"
|
||||
|
||||
for x in dirs:
|
||||
n = x["name"] + "/"
|
||||
if arg == "v":
|
||||
n = "\033[94m" + n
|
||||
|
||||
x["name"] = n
|
||||
|
||||
fmt = fmt.format(len(nfmt.format(biggest)))
|
||||
ret = [
|
||||
"# {}: {}".format(x, ls[x])
|
||||
|
|
|
@ -77,6 +77,9 @@ class TcpSrv(object):
|
|||
if "pub" in title_vars and "external" in unicode(desc):
|
||||
hits.append(("pub", ep))
|
||||
|
||||
if "pub" in title_vars or "all" in title_vars:
|
||||
hits.append(("all", ep))
|
||||
|
||||
for var in title_vars:
|
||||
if var.startswith("ip-") and ep.startswith(var[3:]):
|
||||
hits.append((var, ep))
|
||||
|
@ -262,8 +265,8 @@ class TcpSrv(object):
|
|||
return eps
|
||||
|
||||
def _set_wintitle(self, vars):
|
||||
if "pub" not in vars:
|
||||
vars["pub"] = {"Local-Only": 1}
|
||||
vars["all"] = vars.get("all", {"Local-Only": 1})
|
||||
vars["pub"] = vars.get("pub", vars["all"])
|
||||
|
||||
vars2 = {}
|
||||
for k, eps in vars.items():
|
||||
|
|
|
@ -1485,7 +1485,8 @@ function up2k_init(subtle) {
|
|||
err.indexOf('NotFoundError') !== -1 // macos-firefox permissions
|
||||
) {
|
||||
pvis.seth(t.n, 1, 'OS-error');
|
||||
pvis.seth(t.n, 2, err);
|
||||
pvis.seth(t.n, 2, err + ' @ ' + car);
|
||||
console.log('OS-error', reader.error, '@', car);
|
||||
handled = true;
|
||||
}
|
||||
|
||||
|
@ -2113,7 +2114,7 @@ function up2k_init(subtle) {
|
|||
if (parallel_uploads < 1)
|
||||
bumpthread(1);
|
||||
|
||||
return { "init_deps": init_deps, "set_fsearch": set_fsearch, "ui": pvis }
|
||||
return { "init_deps": init_deps, "set_fsearch": set_fsearch, "ui": pvis, "st": st, "uc": uc }
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue