|
@@ -28,7 +28,7 @@ import urllib
|
|
|
|
|
|
from Ansjer.config import OSS_BUCKET_ENDPOINT, OSS_BUCKET_VOD_LIST, OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, \
|
|
|
OSS_REGION_ID, OSS_ROLE_ARN, SERVER_DOMAIN
|
|
|
-from Model.models import Device_Meal, Device_Info, Order_Model, Store_Meal
|
|
|
+from Model.models import Device_Meal, Device_Info, Order_Model, Store_Meal, VodHlsModel
|
|
|
from Object.ResponseObject import ResponseObject
|
|
|
from Object.TokenObject import TokenObject
|
|
|
from Object.UidTokenObject import UidTokenObject
|
|
@@ -36,7 +36,7 @@ from Service.CommonService import CommonService
|
|
|
|
|
|
'''
|
|
|
# 获取设备推送hls流 证书
|
|
|
-http://192.168.136.40:8077/cloudVod/getSts?uidToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiJGVFNMTDhITTQzN1ozOFdVMTExQSJ9.GIBt8SgY-3yRt9mlihtvRwLM-MT8uVPDKCUQ2yvV3Vo
|
|
|
+http://192.168.136.40:8077/cloudVod/getSts?uidToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOiJGVFNMTDhITTQzN1ozOFdVMTExQSIsImNoYW5uZWwiOiI0In0.HO-PzoRwhQ4CFNkjthqOitf48c-XOvHjtNGCeUmBe9g
|
|
|
# 获取存储的播放文件列表
|
|
|
#修改状态
|
|
|
http://192.168.136.40:8077/cloudVod/status?token=local&did=138001380001543918745881545&channel=4&status=1
|
|
@@ -70,6 +70,8 @@ class CloudVodView(View):
|
|
|
# 付款完成
|
|
|
elif operation == 'payExecute':
|
|
|
return self.do_paypal_execute(request_dict, response)
|
|
|
+ elif operation == 'storeplaylist':
|
|
|
+ return self.do_store_palylist(request_dict,response)
|
|
|
else:
|
|
|
token = request_dict.get('token', None)
|
|
|
# 设备主键uid
|
|
@@ -352,3 +354,20 @@ class CloudVodView(View):
|
|
|
utko = UidTokenObject()
|
|
|
utko.generate(data={'uid': UID, 'channel': channel})
|
|
|
return response.json(0,utko.token)
|
|
|
+
|
|
|
+ def do_store_palylist(self,request_dict,response):
|
|
|
+ uidToken = request_dict.get('uidToken', None)
|
|
|
+ time = request_dict.get('time',None)
|
|
|
+ utko = UidTokenObject(uidToken)
|
|
|
+ if utko.flag is False:
|
|
|
+ return response.json(444, 'uidToken')
|
|
|
+ UID = utko.UID
|
|
|
+ channel = utko.channel
|
|
|
+ print(channel)
|
|
|
+ print(UID)
|
|
|
+ qs = Device_Meal.objects.filter(uid=UID, channel=channel, status=1).values("rank", "channel")
|
|
|
+ if not qs.exists():
|
|
|
+ return response.json(10, '设备未购买')
|
|
|
+ time = int(time)
|
|
|
+ VodHlsModel.objects.create(uid=UID,channel=channel,time=time)
|
|
|
+ return response.json(0)
|