CCC: Put recently watched conferences on top ccc-recentontop
authorChristian Weiske <cweiske@cweiske.de>
Tue, 23 Jan 2018 20:24:01 +0000 (21:24 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 23 Jan 2018 20:24:01 +0000 (21:24 +0100)
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/ccc.py

index 1fbf6e0..0ee537a 100644 (file)
@@ -10,7 +10,7 @@ class CccOverviewScreen(MPScreen):
                MPScreen.__init__(self, session, skin='MP_PluginDescr')
 
                self["actions"] = ActionMap(["MP_Actions"], {
-                       "0"             : self.closeAll,
+                       "0"     : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
                        "up"    : self.keyUp,
@@ -49,7 +49,8 @@ class CccOverviewScreen(MPScreen):
                                        acronym = conference.get('acronym').encode('utf-8')
                                        if acronym in watcheduids:
                                                recent.append((title.strip(), url, True, False, image_url, acronym))
-                                       alls.append((title, url, self.watchdb.hasBeenWatched(acronym), False, image_url, acronym))
+                                       else:
+                                               alls.append((title, url, self.watchdb.hasBeenWatched(acronym), False, image_url, acronym))
                except:
                        pass
 
@@ -58,7 +59,7 @@ class CccOverviewScreen(MPScreen):
 
                alls.sort(key=lambda t : t[0].lower())
 
-               self.filmliste = alls#recent + alls
+               self.filmliste = recent + alls
 
                self.ml.setList(map(self._defaultlistleftmarked, self.filmliste))
                self.keyLocked = False
@@ -232,4 +233,4 @@ class CccWatchDb:
                return uid in self.watched
 
        def getWatched(self, limit = 10, offset = 0):
-               return self.watched[offset:limit]
\ No newline at end of file
+               return self.watched[offset:limit]