forked from 0x2620/pandora
video base url
This commit is contained in:
parent
b56811350b
commit
76dbab1016
2 changed files with 4 additions and 3 deletions
|
@ -63,7 +63,6 @@ def api_update(request):
|
|||
return {'status': {'code': int, 'text': string},
|
||||
'data': {info: list, data: list, file: list}}
|
||||
'''
|
||||
print "here we go fucker", request.user
|
||||
data = json.loads(request.POST['data'])
|
||||
user = request.user
|
||||
|
||||
|
|
|
@ -263,7 +263,9 @@ class Movie(models.Model):
|
|||
stream['duration'] = s.info['duration']
|
||||
if 'video' in s.info and s.info['video']:
|
||||
stream['aspectRatio'] = s.info['video'][0]['width'] / s.info['video'][0]['height']
|
||||
|
||||
if settings.XSENDFILE or settings.XACCELREDIRECT:
|
||||
stream['baseUrl'] = '/%s' % self.movieId
|
||||
else:
|
||||
stream['baseUrl'] = os.path.dirname(s.video.url)
|
||||
stream['profiles'] = list(set(map(lambda s: int(os.path.splitext(s['profile'])[0][:-1]), self.streams.all().values('profile'))))
|
||||
return stream
|
||||
|
|
Loading…
Reference in a new issue