예제 #1
0
IconPath = os.path.join(AddonPath, "resources/media/")
fanart = os.path.join(AddonPath + "/fanart.jpg")


def icon_path(filename):
    if 'http://' in filename:
        return filename
    return os.path.join(IconPath, filename)


args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get('mode', None)

if mode is None:
    addon.add_item({'mode': 'live_sport'}, {'title': 'Live Sport'},
                   img=icon_path('live_sport.jpg'),
                   fanart=fanart,
                   is_folder=True)
    addon.add_item({'mode': 'live_tv'}, {'title': 'Live TV'},
                   img=icon_path('live_tv.jpg'),
                   fanart=fanart,
                   is_folder=True)
    addon.add_item({'mode': 'p2p_corner'}, {'title': 'P2P Corner'},
                   img=icon_path('p2p_corner.jpg'),
                   fanart=fanart,
                   is_folder=True)
    addon.add_item({'mode': 'on_demand_sport_categories'},
                   {'title': 'Sport On Demand'},
                   img=icon_path('sport_on_demand.jpg'),
                   fanart=fanart,
                   is_folder=True)
    #addon.add_item({'mode': 'blogs'}, {'title':'Blogs'}, img=icon_path('blogs.jpg'), fanart=fanart,is_folder=True)
예제 #2
0
fanart = os.path.join(AddonPath + "/fanart.jpg")


def icon_path(filename):
    if "http://" in filename:
        return filename
    return os.path.join(IconPath, filename)


args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get("mode", None)


if mode is None:
    addon.add_item(
        {"mode": "live_sport"}, {"title": "Live Sport"}, img=icon_path("live_sport.jpg"), fanart=fanart, is_folder=True
    )
    addon.add_item(
        {"mode": "live_tv"}, {"title": "Live TV"}, img=icon_path("live_tv.jpg"), fanart=fanart, is_folder=True
    )
    addon.add_item(
        {"mode": "p2p_corner"}, {"title": "P2P Corner"}, img=icon_path("p2p_corner.jpg"), fanart=fanart, is_folder=True
    )
    addon.add_item(
        {"mode": "on_demand_sport_categories"},
        {"title": "Sport On Demand"},
        img=icon_path("sport_on_demand.jpg"),
        fanart=fanart,
        is_folder=True,
    )
    addon.add_item(
예제 #3
0
addon_handle = int(sys.argv[1])

AddonPath = addon.get_path()
IconPath = os.path.join(AddonPath , "resources/media/")
fanart = os.path.join(AddonPath + "/fanart.jpg")
def icon_path(filename):
    if 'http://' in filename:
        return filename
    return os.path.join(IconPath, filename)

args = urlparse.parse_qs(sys.argv[2][1:])
mode = args.get('mode', None)


if mode is None:
    addon.add_item({'mode': 'live_sport'}, {'title':'Live Sport'}, img=icon_path('live_sport.jpg'), fanart=fanart,is_folder=True)
    addon.add_item({'mode': 'live_tv'}, {'title':'Live TV'}, img=icon_path('live_tv.jpg'), fanart=fanart,is_folder=True)
    addon.add_item({'mode': 'p2p_corner'}, {'title':'P2P Corner'}, img=icon_path('p2p_corner.jpg'), fanart=fanart,is_folder=True)
    addon.add_item({'mode': 'on_demand_sport_categories'}, {'title':'Sport On Demand'}, img=icon_path('sport_on_demand.jpg'), fanart=fanart,is_folder=True)
    #addon.add_item({'mode': 'blogs'}, {'title':'Blogs'}, img=icon_path('blogs.jpg'), fanart=fanart,is_folder=True)
    addon.add_item({'mode': 'tools'}, {'title':'Tools'}, img=icon_path('tools.jpg'), fanart=fanart,is_folder=True)
    addon.add_item({'mode': 'my_castaway'}, {'title':'My Castaway'}, img=icon_path('my_castaway.jpg'), fanart=fanart,is_folder=True)

    addon.end_of_directory()
    from resources.lib.modules import cache, control, changelog
    cache.get(changelog.get, 600000000, control.addonInfo('version'), table='changelog')
    

elif mode[0]=='my_castaway':
    #addon.add_item({'mode': 'favourites'}, {'title':'Favourites'}, img=icon_path('favourites.jpg'), fanart=fanart,is_folder=True)
    #addon.add_item({'mode': 'my_lists'}, {'title':'My Lists'}, img=icon_path('my_lists.jpg'), fanart=fanart,is_folder=True)
예제 #4
0
 def add_item(self, queries, infolabels, properties=None, contextmenu_items='', 
              context_replace=False, img='', fanart='', resolved=False, total_items=0, 
              playlist=False, item_type='video', is_folder=False):
     if fanart == '':
         fanart = self.addon.getAddonInfo('fanart')
     return Addon.add_item(self, queries, infolabels, properties, contextmenu_items, context_replace, img, fanart, resolved, total_items, playlist, item_type, is_folder)