diff --git a/pandora/archive/views.py b/pandora/archive/views.py index 80626d58a..87fbed24a 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -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 diff --git a/pandora/backend/models.py b/pandora/backend/models.py index 3a7a2d683..1381e6854 100644 --- a/pandora/backend/models.py +++ b/pandora/backend/models.py @@ -263,8 +263,10 @@ 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'] - - stream['baseUrl'] = os.path.dirname(s.video.url) + 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