Browse Source

修复枪球云存列表

peng 1 year ago
parent
commit
85370279a8
1 changed files with 5 additions and 4 deletions
  1. 5 4
      Controller/CloudStorage.py

+ 5 - 4
Controller/CloudStorage.py

@@ -517,13 +517,13 @@ class CloudStorageView(View):
                                                             end_time__gte=now_time,
                                                             start_time__range=(start_time, end_time),
                                                             type_list=type_list) \
-                .values("id", "start_time", "sec", "fg", "bucket_id")
+                .values("id", "start_time", "sec", "fg", "bucket_id", "channel")
         else:
             vod_hls_qs = split_vod_hls_obj.get_vod_hls_data(uid=uid, channel=channel,
                                                             end_time__gte=now_time,
                                                             start_time__range=(start_time, end_time),
                                                             type_list=type_list) \
-                .values("id", "start_time", "sec", "fg", "bucket_id")
+                .values("id", "start_time", "sec", "fg", "bucket_id", "channel")
 
         vod_play_list = []
         if not vod_hls_qs.exists():
@@ -562,11 +562,12 @@ class CloudStorageView(View):
         tag_type_list = SplitVodHlsObject.query_tag_type_list(start_time, ids)
         for vod in vod_hls_qs:
             bucket_name = regroup_bucket_qs[vod['bucket_id']]['bucket']
-            thumbs_png = '{uid}/vod{channel}/{time}/Thumb.jpeg'.format(uid=uid, channel=channel, time=vod['start_time'])
+            thumbs_png = '{uid}/vod{channel}/{time}/Thumb.jpeg'.format(uid=uid, channel=vod['channel'],
+                                                                       time=vod['start_time'])
             response_url = s3_obj.generate_file_obj_url(bucket_name, thumbs_png)
             vod_url = '{server_domain}cloudstorage/signplaym3u8?' \
                       'uid={uid}&channel={channel}&time={time}&sign=tktktktk'. \
-                format(server_domain=SERVER_DOMAIN_SSL, uid=uid_token, channel=channel, time=vod['start_time'])
+                format(server_domain=SERVER_DOMAIN_SSL, uid=uid_token, channel=vod['channel'], time=vod['start_time'])
             ts_num = int(vod['fg']) & 0xf
             dict_item = [item for item in tag_type_list if item['vod_hls_id'] == vod['id']]
             types = []