From 7766afa1b6bd0da32cb93f6a78b7a12c63c01047 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 14 Apr 2022 10:33:34 +0800 Subject: [PATCH] playcode bug --- server/apps/vod/views.py | 8 ++++---- server/apps/vod/vodclient.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/server/apps/vod/views.py b/server/apps/vod/views.py index c4adcb9..b570be7 100644 --- a/server/apps/vod/views.py +++ b/server/apps/vod/views.py @@ -131,8 +131,8 @@ class PlayCodeAPIView(APIView): """获取播放签名 """ from .vodclient import appId - # try: - playcode = getPlayCode(fileId) - # except: - # raise ParseError('获取签名失败') + try: + playcode = getPlayCode(fileId) + except: + raise ParseError('获取签名失败') return Response({'psign':playcode, 'appId': appId}) diff --git a/server/apps/vod/vodclient.py b/server/apps/vod/vodclient.py index e887f58..87e25e1 100644 --- a/server/apps/vod/vodclient.py +++ b/server/apps/vod/vodclient.py @@ -83,7 +83,6 @@ def getPlayCode(fileId:str): "currentTimeStamp": currentTimeStamp, "pcfg": "basicDrmPreset", } - print(Original) return jwt.encode(Original, referKey, algorithm='HS256') def startSeVideo(fileId:str):