mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
support up2k uploads from old browsertabs
This commit is contained in:
parent
e80c1f6d59
commit
e70e926a40
|
@ -1958,13 +1958,16 @@ class Up2k(object):
|
||||||
"sprs": sprs, # dontcare; finished anyways
|
"sprs": sprs, # dontcare; finished anyways
|
||||||
"size": dsize,
|
"size": dsize,
|
||||||
"lmod": dtime,
|
"lmod": dtime,
|
||||||
"life": cj.get("life"),
|
|
||||||
"addr": ip,
|
"addr": ip,
|
||||||
"at": at,
|
"at": at,
|
||||||
"hash": [],
|
"hash": [],
|
||||||
"need": [],
|
"need": [],
|
||||||
"busy": {},
|
"busy": {},
|
||||||
}
|
}
|
||||||
|
for k in ["life"]:
|
||||||
|
if k in cj:
|
||||||
|
j[k] = cj[k]
|
||||||
|
|
||||||
score = (
|
score = (
|
||||||
(3 if st.st_dev == dev else 0)
|
(3 if st.st_dev == dev else 0)
|
||||||
+ (2 if dp_dir == cj["prel"] else 0)
|
+ (2 if dp_dir == cj["prel"] else 0)
|
||||||
|
@ -2071,11 +2074,14 @@ class Up2k(object):
|
||||||
"name",
|
"name",
|
||||||
"size",
|
"size",
|
||||||
"lmod",
|
"lmod",
|
||||||
"life",
|
|
||||||
"poke",
|
"poke",
|
||||||
]:
|
]:
|
||||||
job[k] = cj[k]
|
job[k] = cj[k]
|
||||||
|
|
||||||
|
for k in ["life"]:
|
||||||
|
if k in cj:
|
||||||
|
job[k] = cj[k]
|
||||||
|
|
||||||
# one chunk may occur multiple times in a file;
|
# one chunk may occur multiple times in a file;
|
||||||
# filter to unique values for the list of missing chunks
|
# filter to unique values for the list of missing chunks
|
||||||
# (preserve order to reduce disk thrashing)
|
# (preserve order to reduce disk thrashing)
|
||||||
|
|
Loading…
Reference in a new issue