poster frame resolutions

This commit is contained in:
j 2011-08-16 12:11:07 +02:00
commit 4fc84b02b7
3 changed files with 10 additions and 4 deletions

View file

@ -400,7 +400,7 @@ class Item(models.Model):
stream['baseUrl'] = '/%s' % self.itemId
else:
stream['baseUrl'] = os.path.dirname(s.video.url)
stream['profiles'] = sorted(list(set(map(lambda s: int(os.path.splitext(s['profile'])[0][:-1]), self.streams.all().values('profile')))))
stream['resolutions'] = sorted(list(set(map(lambda s: int(os.path.splitext(s['profile'])[0][:-1]), self.streams.all().values('profile')))))
stream['formats'] = list(set(map(lambda s: os.path.splitext(s['profile'])[1][1:], self.streams.all().values('profile'))))
return stream