Ver código fonte

Merge branch 'top-video' into test

liqian 3 anos atrás
pai
commit
bccc580d98
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5 0
      video_recall.py

+ 5 - 0
video_recall.py

@@ -395,6 +395,11 @@ class PoolRecall(object):
                 if self.client_info.get('cityCode') in city_code_list or config_.ALL_AREA_CODE in city_code_list:
                     # log_.info('===2=== {}, ===3=== video_id: {}, cityCode: {}'.format(
                     #     self.client_info.get('cityCode'), video_id, city_code_list))
+                    if video_id in video_ids and item['score'] > video_info[video_id].get('score'):
+                        # 如果video_id有重复,score保留大分值
+                        video_info[video_id] = {'score': item['score'], 'cityCode': city_code_list}
+                    else:
+                        continue
                     video_ids.append(video_id)
                     video_info[video_id] = {'score': item['score'], 'cityCode': city_code_list}