Parcourir la source

修复枪球云存列表

peng il y a 1 an
Parent
commit
f3c62658c5
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      Controller/CloudStorage.py

+ 4 - 4
Controller/CloudStorage.py

@@ -501,13 +501,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():
@@ -546,11 +546,11 @@ 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 = []