Exemple #1
0
def index():
    '''
    Display sites
    '''
    plugin.log.debug('Get sites')

    items = [{
        'label':
        sc.LONG_NAME,
        'path':
        plugin.url_for('get_category_menu', siteid=index, cls=sc.__name__),
        'thumbnail':
        util.get_image_path(sc.LOCAL_THUMB),
        'icon':
        util.get_image_path(sc.LOCAL_THUMB),
    } for index, sc in enumerate(BaseI4M.__subclasses__())]

    thumb = util.get_image_path('settings.png')
    items.append({
        'label':
        '[COLOR white]{txt}[/COLOR]'.format(txt=_('url_resolver_settings')),
        'path':
        plugin.url_for('get_urlresolver_settings'),
        'thumbnail':
        thumb,
        'icon':
        thumb
    })

    return items
def index():
    '''
    Display sites
    '''
    plugin.log.debug('Get sites')

    items = [{
        'label': sc.LONG_NAME,
        'path': plugin.url_for(
            'get_category_menu', siteid=index,
            cls=sc.__name__),
        'thumbnail': util.get_image_path(sc.LOCAL_THUMB),
        'icon': util.get_image_path(sc.LOCAL_THUMB),
        } for index, sc in enumerate(BaseI4M.__subclasses__())]

    thumb = util.get_image_path('settings.png')
    items.append({
        'label': '[COLOR white]{txt}[/COLOR]'.format(
            txt=_('url_resolver_settings')),
        'path': plugin.url_for('get_urlresolver_settings'),
        'thumbnail': thumb,
        'icon': thumb
        })

    return items
def index():
    items = [{
        'label': sc.long_name,
        'path': plugin.url_for(
            'get_season_menu', siteid=index,
            cls=sc.__name__),
        'thumbnail': util.get_image_path(sc.local_thumb),
        'icon': util.get_image_path(sc.local_thumb),
        } for index, sc in enumerate(BaseForum.__subclasses__())]

    by_label = itemgetter('label')
    items = sorted(items, key=by_label)

    # insert bookmarks at top
    items.insert(0, {
        'label': '[B]{txt}[/B]'.format(txt=_('bookmarks')),
        'path': plugin.url_for('show_bookmarks'),
        'thumbnail': util.get_image_path('bookmark.png')})

    # add url resolver settings at bottom
    thumb = util.get_image_path('settings.png')
    items.append({
        'label': '[COLOR white]{txt}[/COLOR]'.format(
            txt=_('url_resolver_settings')),
        'path': plugin.url_for('get_urlresolver_settings'),
        'thumbnail': thumb,
        'icon': thumb
        })
    return items
def index():
    items = [{
        'label': '[B]{txt}[/B]'.format(txt=_('bookmarks')),
        'path': plugin.url_for('show_bookmarks'),
        'thumbnail': util.get_image_path('bookmark.png')
    }]

    items.extend([{
        'label':
        sc.long_name,
        'path':
        plugin.url_for('get_category_menu', siteid=index, cls=sc.__name__),
        'thumbnail':
        util.get_image_path(sc.local_thumb),
        'icon':
        util.get_image_path(sc.local_thumb),
    } for index, sc in enumerate(BaseForum.__subclasses__())])

    # live streams if xml url specified
    url = plugin.get_setting(livestream_xml_url, str)
    if url:
        thumb = util.get_image_path('thumb_live.jpg')
        items.append({
            'label': '[B]{txt}[/B]'.format(txt=_('live_streams')),
            'path': plugin.url_for('get_live_channels'),
            'thumbnail': thumb,
            'icon': thumb
        })

    thumb = util.get_image_path('settings.png')
    items.append({
        'label':
        '[COLOR white]{txt}[/COLOR]'.format(txt=_('url_resolver_settings')),
        'path':
        plugin.url_for('get_urlresolver_settings'),
        'thumbnail':
        thumb,
        'icon':
        thumb
    })
    return items
Exemple #5
0
def index():
    items = [{
        'label': '[B]{txt}[/B]'.format(txt=_('bookmarks')),
        'path': plugin.url_for('show_bookmarks'),
        'thumbnail': util.get_image_path('bookmark.png')}]

    items.extend([{
        'label': sc.long_name,
        'path': plugin.url_for(
            'get_category_menu', siteid=index,
            cls=sc.__name__),
        'thumbnail': util.get_image_path(sc.local_thumb),
        'icon': util.get_image_path(sc.local_thumb),
        } for index, sc in enumerate(BaseForum.__subclasses__())])

    # live streams if xml url specified
    url = plugin.get_setting(livestream_xml_url, str)
    if url:
        thumb = util.get_image_path('thumb_live.jpg')
        items.append({
            'label': '[B]{txt}[/B]'.format(
                txt=_('live_streams')),
            'path': plugin.url_for('get_live_channels'),
            'thumbnail': thumb,
            'icon': thumb
        })

    thumb = util.get_image_path('settings.png')
    items.append({
        'label': '[COLOR white]{txt}[/COLOR]'.format(
            txt=_('url_resolver_settings')),
        'path': plugin.url_for('get_urlresolver_settings'),
        'thumbnail': thumb,
        'icon': thumb
        })
    return items
 def thumb(self):
     if self.__thumb:
         self.__thumb = util.get_image_path(self.__thumb)
     return self.__thumb
 def thumb(self):
     if self.__thumb:
         self.__thumb = util.get_image_path(self.__thumb)
     return self.__thumb