mkv、avi格式视频不需要dash可

master
Abbey 5 years ago
parent a4f0f3c580
commit 7983b10bcc
  1. 14
      app/utils/common.py

@ -183,13 +183,13 @@ def _getdownloadurl(id,user):
else:
ErrorLogger().print_r('Getting resource:{} {} error:{}'.format(id,filename,data.get('error').get('message')))
downloadUrl=data.get('error').get('message')
if ext in ['webm','avi','mpg', 'mpeg', 'rm', 'rmvb', 'mov', 'wmv', 'mkv', 'asf'] and od_type=='nocn':
play_url=_thunbnail(id,user)
play_url=play_url.replace('thumbnail','videomanifest').replace('&width=800&height=800','')+'&part=index&format=dash&useScf=True&pretranscode=0&transcodeahead=0'
# play_url=re.sub('inputFormat=.*?&','inputFormat=mp4&',play_url)
# downloadUrl=downloadUrl.replace('thumbnail','videomanifest').replace('&width=800&height=800','')+'&part=index&format=dash&useScf=True&pretranscode=0&transcodeahead=0'
else:
play_url=downloadUrl
# if ext in ['webm','avi','mpg', 'mpeg', 'rm', 'rmvb', 'mov', 'wmv', 'mkv', 'asf'] and od_type=='nocn' and 1==0:
# play_url=_thunbnail(id,user)
# play_url=play_url.replace('thumbnail','videomanifest').replace('&width=800&height=800','')+'&part=index&format=dash&useScf=True&pretranscode=0&transcodeahead=0'
# # play_url=re.sub('inputFormat=.*?&','inputFormat=mp4&',play_url)
# # downloadUrl=downloadUrl.replace('thumbnail','videomanifest').replace('&width=800&height=800','')+'&part=index&format=dash&useScf=True&pretranscode=0&transcodeahead=0'
# else:
play_url=downloadUrl
return downloadUrl,play_url
def GetDownloadUrl(id,user):

Loading…
Cancel
Save