|
@@ -11,6 +11,7 @@
|
|
|
@file: cloudstorage.py
|
|
|
@Contact: chanjunkai@163.com
|
|
|
"""
|
|
|
+import base64
|
|
|
import json
|
|
|
import os
|
|
|
import time
|
|
@@ -252,6 +253,7 @@ class CloudStorageView(View):
|
|
|
|
|
|
def do_sign_play_m3u8(self, request_dict, response):
|
|
|
uid = request_dict.get('uid', None)
|
|
|
+ uid = base64.b64decode(uid).decode("utf-8")
|
|
|
channel = request_dict.get('channel', None)
|
|
|
storeTime = request_dict.get('time', None)
|
|
|
now_time = int(time.time())
|
|
@@ -465,7 +467,7 @@ class CloudStorageView(View):
|
|
|
)
|
|
|
vod_url = '{server_domain}/cloudstorage/signplaym3u8?' \
|
|
|
'uid={uid}&channel={channel}&time={time}&sign=tktktktk'. \
|
|
|
- format(server_domain=SERVER_DOMAIN, uid=uid, channel=channel, time=vod['time'])
|
|
|
+ format(server_domain=SERVER_DOMAIN, uid=base64.b64encode(uid.encode("utf-8")), channel=channel, time=vod['time'])
|
|
|
ts_num = int(vod['fg']) & 0xf
|
|
|
vod_play_list.append({
|
|
|
'name': vod['time'],
|