|
@@ -207,8 +207,7 @@ class CloudStorageView(View):
|
|
|
now_time = int(time.time())
|
|
|
vh_qs = VodHlsModel.objects.filter(uid=uid, channel=channel, time=storeTime, endTime__gte=now_time). \
|
|
|
values("sec", "fg", "bucket__bucket", "bucket__endpoint", "bucket__region", "bucket__mold")
|
|
|
- if not vh_qs.exists():
|
|
|
- return response.json(11,'不存在.')
|
|
|
+ if not vh_qs.exists(): return response.json(11,'不存在.')
|
|
|
sec = vh_qs[0]['sec']
|
|
|
fg = vh_qs[0]['fg']
|
|
|
bucket__region = vh_qs[0]['bucket__region']
|
|
@@ -443,6 +442,8 @@ class CloudStorageView(View):
|
|
|
( uid=uid, channel=channel, time__range=(startTime, endTime), endTime__gte=now_time). \
|
|
|
values("time", "sec", "bucket__bucket", "fg", "bucket__endpoint", "bucket__region", "bucket__mold")
|
|
|
vod_play_list = []
|
|
|
+
|
|
|
+
|
|
|
print(int(time.time()))
|
|
|
for vod in vh_qs:
|
|
|
bucket__mold = vod["bucket__mold"]
|
|
@@ -474,6 +475,7 @@ class CloudStorageView(View):
|
|
|
# region_name=bucket__region
|
|
|
# )
|
|
|
# conn = session.client('s3')
|
|
|
+
|
|
|
# thumbspng = '{uid}/vod{channel}/{time}/Thumb.jpeg'. \
|
|
|
# format(uid=uid, channel=channel, time=vod['time'])
|
|
|
# response_url = conn.generate_presigned_url(
|
|
@@ -485,6 +487,7 @@ class CloudStorageView(View):
|
|
|
# ExpiresIn=3600
|
|
|
# )
|
|
|
# thumb_url = response_url
|
|
|
+ # format(uid=uid, channel=channel, time=vod['time'])
|
|
|
|
|
|
vod_url = '{server_domain}/cloudstorage/signplaym3u8?' \
|
|
|
'uid={uid}&channel={channel}&time={time}&sign=tktktktk'. \
|