Exemple #1
0
 def prepare(self):
     self.items_done = []
     recent_items = getRecentItems()
     missing = getAllMissing(recent_items)
     ids = set([id for added_at, id, title in missing])
     self.items_searching = missing
     self.items_searching_ids = ids
     self.items_failed = []
     self.percentage = 0
     self.time_start = datetime.datetime.now()
     self.ready_for_display = True
Exemple #2
0
def recentItemsMenu(title, base_title=None):
    oc = ObjectContainer(title2=title, no_cache=True, no_history=True)
    recent_items = getRecentItems()
    if recent_items:
        missing_items = getAllMissing(recent_items)
        if missing_items:
            for added_at, item_id, title in missing_items:
                oc.add(DirectoryObject(
                    key=Callback(RefreshItemMenu, title=base_title + " > " + title, item_title=title, rating_key=item_id), title=title
                ))

    return oc
Exemple #3
0
def recentItemsMenu(title, base_title=None):
    oc = ObjectContainer(title2=title, no_cache=True, no_history=True)
    recent_items = getRecentItems()
    if recent_items:
        missing_items = getAllMissing(recent_items)
        if missing_items:
            for added_at, item_id, title in missing_items:
                oc.add(DirectoryObject(
                    key=Callback(RefreshItemMenu, title=base_title + " > " + title, item_title=title, rating_key=item_id), title=title
                ))

    return oc