示例#1
0
文件: addon.py 项目: camster1/RTOTV
def show_browse_methods():
    '''Default view. Displays the different ways to browse the site.'''
    items = [{
        'label': ctg,
        'path': plugin.url_for('show_genres', category=ctg),
    } for ctg in api.get_categories()]
    return items
def index():
    '''The main view, lists available categories.'''
    items = [{
        'path': plugin.url_for('show_category', url=item['url']),
        'label': item['title'],
    } for item in get_categories()]

    return items
示例#3
0
 def test_get_categories(self):
     items = api.get_categories()
     self.assertEqual(items,
                      [u'Movie Billboards', u'Serials', u'Silent Films'])