コード例 #1
0
    def list_genre(self, serie, genre_index, page=0):
        genre = dreamfilm.GENRES[genre_index]
        items = dreamfilm.list_genre(genre, serie, page)
        for item in items:
            self.add_movie_list_item(item)

        # TODO: Refactor add_menu_item structure
        params = {
            'action': 'list_genre',
            'genre_index': genre_index,
            'serie': serie,
            'page': page + 1
        }
        name = 'Next'
        action_url = self.plugin_url + Navigation.encode_parameters(params)
        list_item = self.xbmcgui.ListItem(name)
        list_item.setInfo(type='Video', infoLabels={'Title': name})
        self.xbmcplugin.addDirectoryItem(handle=self.handle,
                                         url=action_url,
                                         listitem=list_item,
                                         isFolder=True)

        return self.xbmcplugin.endOfDirectory(self.handle)
コード例 #2
0
    def list_genre(self, serie, genre_index, page=0):
        genre = dreamfilm.GENRES[genre_index]
        items = dreamfilm.list_genre(genre, serie, page)
        for item in items:
            self.add_movie_list_item(item)

        # TODO: Refactor add_menu_item structure
        params = {
            'action': 'list_genre',
            'genre_index': genre_index,
            'serie': serie,
            'page': page + 1
        }
        name = 'Next'
        action_url = self.plugin_url + Navigation.encode_parameters(params)
        list_item = self.xbmcgui.ListItem(name)
        list_item.setInfo(type='Video', infoLabels={'Title': name})
        self.xbmcplugin.addDirectoryItem(handle=self.handle,
                                         url=action_url,
                                         listitem=list_item,
                                         isFolder=True)

        return self.xbmcplugin.endOfDirectory(self.handle)