def UpdateDownloaderCreator(url):
    printDBG("UpdateDownloaderCreator url[%s]" % url)
    if url.startswith('https'):
        if IsExecutable(DMHelper.GET_WGET_PATH()):
            printDBG("UpdateDownloaderCreator WgetDownloader")
            return WgetDownloader()
        elif IsExecutable('python'):
            printDBG("UpdateDownloaderCreator PwgetDownloader")
            return PwgetDownloader()
    else:
        if IsExecutable('wget'):
            printDBG("UpdateDownloaderCreator BuxyboxWgetDownloader")
            return BuxyboxWgetDownloader()
        elif IsExecutable(DMHelper.GET_WGET_PATH()):
            printDBG("UpdateDownloaderCreator WgetDownloader")
            return WgetDownloader()
        elif IsExecutable('python'):
            printDBG("UpdateDownloaderCreator PwgetDownloader")
            return PwgetDownloader()
    printDBG("UpdateDownloaderCreator downloader not available")
    return PwgetDownloader()
Exemple #2
0
def SetupDownloaderCmdCreator(url, file):
    printDBG("SetupDownloaderCreator url[%s]" % url)
    if url.startswith('https'):
        if IsExecutable(DMHelper.GET_WGET_PATH()):
            printDBG("SetupDownloaderCreator WgetDownloader")
            return '%s "%s" -O "%s" ' % (DMHelper.GET_WGET_PATH(), url, file)
        elif IsExecutable('python'):
            printDBG("SetupDownloaderCreator PwgetDownloader")
            return 'python "%s" "%s" "%s" ' % (DMHelper.GET_PWGET_PATH(), url,
                                               file)
    else:
        if IsExecutable('wget'):
            printDBG("SetupDownloaderCreator BuxyboxWgetDownloader")
            return 'wget "%s" -O "%s" ' % (url, file)
        elif IsExecutable(DMHelper.GET_WGET_PATH()):
            printDBG("SetupDownloaderCreator WgetDownloader")
            return '%s "%s" -O "%s" ' % (DMHelper.GET_WGET_PATH(), url, file)
        elif IsExecutable('python'):
            printDBG("SetupDownloaderCreator PwgetDownloader")
            return 'python "%s" "%s" "%s" ' % (DMHelper.GET_PWGET_PATH(), url,
                                               file)
    printDBG("SetupDownloaderCreator downloader not available")
    return 'python "%s" "%s" "%s" ' % (DMHelper.GET_PWGET_PATH(), url, file)
Exemple #3
0
 def isWorkingCorrectly(self, callBackFun):
     self.iptv_sys = iptv_system(
         DMHelper.GET_WGET_PATH() + " -V 2>&1 ",
         boundFunction(self._checkWorkingCallBack, callBackFun))