support up2k uploads from old browsertabs

This commit is contained in:
ed 2022-09-24 14:35:51 +02:00
parent e80c1f6d59
commit e70e926a40

View file

@ -1958,13 +1958,16 @@ class Up2k(object):
"sprs": sprs, # dontcare; finished anyways
"size": dsize,
"lmod": dtime,
"life": cj.get("life"),
"addr": ip,
"at": at,
"hash": [],
"need": [],
"busy": {},
}
for k in ["life"]:
if k in cj:
j[k] = cj[k]
score = (
(3 if st.st_dev == dev else 0)
+ (2 if dp_dir == cj["prel"] else 0)
@ -2071,11 +2074,14 @@ class Up2k(object):
"name",
"size",
"lmod",
"life",
"poke",
]:
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;
# filter to unique values for the list of missing chunks
# (preserve order to reduce disk thrashing)