Exemplo n.º 1
0
    from resources.lib.modules import parental
    parent = parental.Parental()
    parent.setPassword()

elif mode[0] == 'change_password':
    from resources.lib.modules import parental
    parent = parental.Parental()
    parent.changePassword()

elif mode[0] == 'settings':
    from resources.lib.modules import control
    control.openSettings()

elif mode[0] == 'addon_installer':
    from resources.lib.modules import addonInstaller
    addons = addonInstaller.get_addons()
    for a in addons:
        addon.add_item(
            {
                'mode': 'install',
                'id': a[2],
                'key': a[1],
                'name': a[0]
            }, {
                'title': a[0],
                'plot': 'Install addon'
            },
            img=a[3],
            fanart=fanart,
            is_folder=True)
Exemplo n.º 2
0
    parent = parental.Parental()
    parent.setPassword()

elif mode[0]=='change_password':
    from resources.lib.modules import parental
    parent = parental.Parental()
    parent.changePassword()


elif mode[0]=='settings':
    from resources.lib.modules import control
    control.openSettings()

elif mode[0]=='addon_installer':
    from resources.lib.modules import addonInstaller
    addons = addonInstaller.get_addons()
    for a in addons:
        addon.add_item({'mode': 'install', 'id':a[2], 'key':a[1], 'name':a[0]}, {'title': a[0], 'plot': 'Install addon'}, img=a[3], fanart=fanart, is_folder=True)

    addon.end_of_directory()

elif mode[0]=='install':
    id = args['id'][0]
    key = args['key'][0]
    name = args['name'][0]

    from resources.lib.modules import addonInstaller
    if not addonInstaller.isInstalled(id):
        addonInstaller.install(key)
    else:
        from resources.lib.modules import control