From 633ad1a3ff6196332e672f3dc682d096fd78dee2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 22 Jul 2013 19:45:11 +0000 Subject: [PATCH] select selected poster --- pandora/item/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 3ca49683..e88444a6 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -458,8 +458,9 @@ class Item(models.Model): for service in external_posters: p = external_posters[service][0] + selected = True if self.poster_source and self.poster_source == service or url == p['url'] else False p['source'] = service - p['selected'] = self.poster_source and self.poster_source == service or False + p['selected'] = selected p['index'] = index.index(service) posters.append(p) posters.sort(key=lambda a: a['index']) @@ -563,7 +564,7 @@ class Item(models.Model): i['resolution'] = (streams[0].file.width, streams[0].file.height) #only needed by admins - if keys and 'posters' in keys: + if 'posters' in i or (keys and 'posters' in keys): i['posters'] = self.get_posters() frames = self.get_frames()