addon.setSetting("vpn_provider_validated", "")
            addon.setSetting("vpn_locations_list", "")
            addon.setSetting("vpn_username_validated", "")
            addon.setSetting("vpn_password_validated", "")
            # Re-enble the wizard
            addon.setSetting("vpn_wizard_enabled", "true")
            resumeConfigUpdate()
            xbmcgui.Dialog().ok(
                addon_name,
                "Reset the VPN provider. Validate a connection to start using a VPN again.\n"
            )

    # Generate the VPN provider files
    if action == "generate":
        # Only used during development to create location files
        generateAll()
        xbmcgui.Dialog().ok(
            addon_name, "Regenerated some or all of the VPN location files.\n")

    # Delete all of the downloaded VPN files
    if action == "downloads":
        debugTrace("Deleting all downloaded VPN files")
        removeDownloadedFiles()
        xbmcgui.Dialog().ok(
            addon_name,
            "Deleted all of the downloaded VPN files. They'll be downloaded again if required.\n"
        )

    # Copy the log file
    elif action == "log":
        log_path = ""
Exemple #2
0
                if isAlternative(vpn_provider): resetAlternative(vpn_provider)          
                # Reset the IP service error counts, etc
                resetIPServices()
                addon = xbmcaddon.Addon(getID())
                resetVPNProvider(addon)
                addon = xbmcaddon.Addon(getID())
                resumeConfigUpdate()
                xbmcgui.Dialog().ok(addon_name, "Reset the VPN provider. Validate a connection to start using a VPN again.")
        else:
            xbmcgui.Dialog().ok(addon_name, "Connection to VPN being attempted and has been aborted.  Try again in a few seconds.")
            setAPICommand("Disconnect")
            
    # Generate the VPN provider files
    if action == "generate":
        # Only used during development to create location files
        generateAll()
        xbmcgui.Dialog().ok(addon_name, "Regenerated some or all of the VPN location files.")        
           

    # Delete all of the downloaded VPN files
    if action == "downloads":
        debugTrace("Deleting all downloaded VPN files")
        removeDownloadedFiles()
        xbmcgui.Dialog().ok(addon_name, "Deleted all of the downloaded VPN files. They'll be downloaded again if required.")

            
    # Copy the log file        
    elif action == "log":
        log_path = ""
        dest_path = ""
        try: