@@ -223,6 +223,7 @@ def get_detail_information_by_operation(operation_id):
223223 workplace_id = timestamp .workplace_number
224224 order_id = timestamp .order_operation .order_id
225225 order = Orders .objects .get (id = order_id )
226+ timespan_id = timestamp .id
226227
227228 sTime = int (timestamp .started_at .timestamp () * 1000 ) if timestamp .started_at else None
228229 eTime = int (timestamp .finished_at .timestamp () * 1000 ) if timestamp .finished_at else None
@@ -233,14 +234,15 @@ def get_detail_information_by_operation(operation_id):
233234 for zone_camera in cameras_zones :
234235 camera_id = zone_camera .camera .id
235236 video = get_skany_video_info (sTime , camera_id )
236- get_playlist_camera (sTime , eTime , camera_id )
237-
238- if video not in videos :
239- if not eTime :
240- eTime = int (datetime .now ().timestamp () * 1000 )
241- playlist_content = get_playlist_camera (sTime , eTime , camera_id )
242- video ['playlist' ] = base64 .b64encode (playlist_content ).decode ('utf-8' )
243- videos .append (video )
237+ if video .get ("status" ) == True :
238+ get_playlist_camera (sTime , eTime , camera_id , timespan_id )
239+
240+ if video not in videos :
241+ if not eTime :
242+ eTime = int (datetime .now ().timestamp () * 1000 )
243+ playlist_content = get_playlist_camera (sTime , eTime , camera_id , timespan_id )
244+ video ['playlist' ] = base64 .b64encode (playlist_content ).decode ('utf-8' )
245+ videos .append (video )
244246
245247 if not timestamp .employee :
246248 username = timestamp .employee .username
0 commit comments