def list_trakt_sortby(self, info, **kwargs):
     kwargs['info'] = kwargs.pop('parent_info', None)
     items = get_sort_methods(
     ) if kwargs['info'] == 'trakt_userlist' else get_sort_methods(True)
     items = [self._list_trakt_sortby_item(i, kwargs.copy()) for i in items]
     self.library = 'video'
     return items
Esempio n. 2
0
def sort_list(**kwargs):
    sort_methods = get_sort_methods()
    x = xbmcgui.Dialog().contextmenu([i['name'] for i in sort_methods])
    if x == -1:
        return
    for k, v in viewitems(sort_methods[x]['params']):
        kwargs[k] = v
    xbmc.executebuiltin(try_encode(format_folderpath(encode_url(**kwargs))))