# HG changeset patch # User cavaliet # Date 1357574462 -3600 # Node ID 54b0ac8c4a1f65a6492c2dbf6cda657bd9e14cd8 # Parent 0eee72ebc2c07c6522840f9f7d774bdd7b198864 avoid doubloon in mashuptag diff -r 0eee72ebc2c0 -r 54b0ac8c4a1f src/ldt/ldt/ldt_utils/views/json.py --- a/src/ldt/ldt/ldt_utils/views/json.py Mon Jan 07 15:50:28 2013 +0100 +++ b/src/ldt/ldt/ldt_utils/views/json.py Mon Jan 07 17:01:02 2013 +0100 @@ -167,7 +167,7 @@ for res in highest_weighted: cur_in = res["start_ts"] cur_out = cur_in + res["duration"] - if tc_in<=cur_in and cur_out<=tc_out and ((not remove_zero_dur) or (remove_zero_dur and res["duration"]>0.0)): + if tc_in<=cur_in and cur_out<=tc_out and ((not remove_zero_dur) or (remove_zero_dur and res["duration"]>0.0)) and (res["element_id"] not in mashup_list["items"]): #mashup_list["items"].append(res["iri_id"] + ", " + res["element_id"] + ", " + str(res["start_ts"]) + ", " + str(res["duration"]) + ", " + str(res["weight"])) #mashup_list["items"].append(res["element_id"] + ", " + str(res["weight"]) + ", " + res["title"]) mashup_list["items"].append(res["element_id"])