src/ldt/ldt/ldt_utils/views/json.py
changeset 1076 a11c8dba822e
parent 1056 4edd2744637c
child 1093 03104d3f6ca1
equal deleted inserted replaced
1075:66c7a0826bd7 1076:a11c8dba822e
   176                     cur_in = float(res["start_ts"])
   176                     cur_in = float(res["start_ts"])
   177                     dur = float(res["duration"])
   177                     dur = float(res["duration"])
   178                     cur_out = cur_in + dur
   178                     cur_out = cur_in + dur
   179                     if tc_in<=cur_in and cur_out<=tc_out and ((not remove_zero_dur) or (remove_zero_dur and dur>0.0)):
   179                     if tc_in<=cur_in and cur_out<=tc_out and ((not remove_zero_dur) or (remove_zero_dur and dur>0.0)):
   180                         mashup_list["items"].append(res["element_id"])
   180                         mashup_list["items"].append(res["element_id"])
       
   181             if mashup_dict["lists"] is None:
       
   182                 mashup_dict["lists"] = []
   181             mashup_dict["lists"].append(mashup_list)
   183             mashup_dict["lists"].append(mashup_list)
   182     
   184     
   183             # If asked, we remove the annotations not used in the mashup.
   185             # If asked, we remove the annotations not used in the mashup.
   184             # It enabled a lighter response 
   186             # It enabled a lighter response 
   185             remove_not_used_str = request.REQUEST.get("removenotused")
   187             remove_not_used_str = request.REQUEST.get("removenotused")