From 35361bff1ef59e72cd5acb81ffeac6f479a9df93 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 1 Apr 2011 14:31:05 +0200 Subject: [PATCH] sort profiles --- pandora/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index bd571793d..eb6634302 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -311,7 +311,7 @@ class Item(models.Model): stream['baseUrl'] = '/%s' % self.itemId 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')))) + stream['profiles'] = 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