diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 17943184..548af2e2 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -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)