Beispiel #1
0
    def install_from_repo( self, addonName, addonUrl, addonFormat, repoUrl ):
        """
        Install an addon from a remote/web repository
        """
        status = "CANCELED"
        destination = None
        addonInstaller = None

        if addonFormat == "zip":
            # install from zip file
            addonInstaller = RemoteArchiveInstaller.RemoteArchiveInstaller( addonName, addonUrl )
        else:
            # Remote dir installer
            addonInstaller = RemoteArchiveInstaller.RemoteDirInstaller( addonName, addonUrl, repoUrl )

        dp = RecursiveDialogProgress(__language__( 30137 ), __language__( 30138 ))
        status, destination = addonInstaller.installItem( msgFunc=self.message_cb, progressBar=dp )
        dp.close()
        del dp
        return status, addonName, destination, addonInstaller
Beispiel #2
0
    def install_from_zip(self):
        """
        Install an addon from a local zip file
        """
        status = "OK"
        destination = None
        addonInstaller = None

        dialog = xbmcgui.Dialog()
        zipPath = dialog.browse(1, 'XBMC', 'files', '', False, False, SPECIAL_HOME_DIR)
        itemName = os.path.basename(zipPath)
        xbmc.log("_install_from_zip - installing %s"%zipPath, xbmc.LOGDEBUG)

        # install from zip file
        addonInstaller = LocalArchiveInstaller.LocalArchiveInstaller( zipPath )
        #dp = xbmcgui.DialogProgress()
        #dp.create(__language__( 30137 ))
        dp = RecursiveDialogProgress(__language__( 30137 ), __language__( 30138 ))
        status, destination = addonInstaller.installItem( msgFunc=self.message_cb, progressBar=dp )

        dp.close()
        del dp
        return status, itemName, destination, addonInstaller