|
@@ -34,14 +34,15 @@ def get_video_data(keyword:str ,db :Session):
|
|
tag_lable = []
|
|
tag_lable = []
|
|
for info in get_video_tag_list(db, i.id):
|
|
for info in get_video_tag_list(db, i.id):
|
|
tag_info = get_dict_data_info(db, info.dict_type, info.dict_value)
|
|
tag_info = get_dict_data_info(db, info.dict_type, info.dict_value)
|
|
- if tag_info.dict_label not in tag_lable:
|
|
|
|
- tag.append({"id": info.id,
|
|
|
|
- "video_code": i.id,
|
|
|
|
- "dict_type": info.dict_type,
|
|
|
|
- "dict_value": info.dict_value,
|
|
|
|
- "dict_label": tag_info.dict_label,
|
|
|
|
- "dict_code": tag_info.dict_code})
|
|
|
|
- tag_lable.append(tag_info.dict_label)
|
|
|
|
|
|
+ if tag_info:
|
|
|
|
+ if tag_info.dict_label not in tag_lable:
|
|
|
|
+ tag.append({"id": info.id,
|
|
|
|
+ "video_code": i.id,
|
|
|
|
+ "dict_type": info.dict_type,
|
|
|
|
+ "dict_value": info.dict_value,
|
|
|
|
+ "dict_label": tag_info.dict_label,
|
|
|
|
+ "dict_code": tag_info.dict_code})
|
|
|
|
+ tag_lable.append(tag_info.dict_label)
|
|
result.append({"id": i.id, "name": i.name, "dataType": i.dataType, "area": i.area, "longitude": i.longitude,
|
|
result.append({"id": i.id, "name": i.name, "dataType": i.dataType, "area": i.area, "longitude": i.longitude,
|
|
"latitude": i.latitude, "address": i.address, "tag_info":tag}) #"dict_label": i.dict_label,
|
|
"latitude": i.latitude, "address": i.address, "tag_info":tag}) #"dict_label": i.dict_label,
|
|
|
|
|