Esempio n. 1
0
    def __init__( self, *args, **kwargs ):
        self.configManager = configCtrl()
        if not self.configManager.is_conf_valid: raise

        self.srvHost            = self.configManager.host
        self.srvPassword        = self.configManager.password
        self.srvUser            = self.configManager.user
        self.srvItemDescripDir  = self.configManager.itemDescripDir
        self.srvItemDescripFile = self.configManager.itemDescripFile

        print "InfoWarehouseEltTreeXMLFTP starts"
        self.mainwin  = kwargs[ "mainwin" ]

        #self.thumb_size_on_load = self.mainwin.settings[ "thumb_size" ]

        # FIFO des images a telecharger
        self.image_queue = []

        # On recupere le fichier de description des items
        print "self._downloadFile", self.srvItemDescripDir + self.srvItemDescripFile
        self._downloadFile( self.srvItemDescripDir + self.srvItemDescripFile, isTBN=False )

        self.parse_xml_sections()
        
        self.stopUpdateImageThread = False # Flag indiquant si on doit stopper ou non le thread getImagesQueue_thread
Esempio n. 2
0
    def __init__(self, *args, **kwargs):
        self.configManager = configCtrl()
        if not self.configManager.is_conf_valid: raise

        self.srvHost = self.configManager.host
        self.srvPassword = self.configManager.password
        self.srvUser = self.configManager.user
        self.srvItemDescripDir = self.configManager.itemDescripDir
        self.srvItemDescripFile = self.configManager.itemDescripFile

        print "InfoWarehouseEltTreeXMLFTP starts"
        self.mainwin = kwargs["mainwin"]

        #self.thumb_size_on_load = self.mainwin.settings[ "thumb_size" ]

        # FIFO des images a telecharger
        self.image_queue = []

        # On recupere le fichier de description des items
        print "self._downloadFile", self.srvItemDescripDir + self.srvItemDescripFile
        self._downloadFile(self.srvItemDescripDir + self.srvItemDescripFile,
                           isTBN=False)

        self.parse_xml_sections()

        self.stopUpdateImageThread = False  # Flag indiquant si on doit stopper ou non le thread getImagesQueue_thread
Esempio n. 3
0
    def __init__(self, *args, **kwargs):
        Browser.__init__(self, *args, **kwargs)

        # Creation du configCtrl
        from CONF import configCtrl
        self.configManager = configCtrl()
        if not self.configManager.is_conf_valid: raise

        self.host = self.configManager.host
        self.user = self.configManager.user
        self.password = self.configManager.password
        self.remotedirList = self.configManager.remotedirList

        #self.localdirList       = self.configManager.localdirList
        #self.downloadTypeList   = self.configManager.downloadTypeLst

        self.racineDisplayList = [
            Item.TYPE_SKIN, Item.TYPE_SCRAPER, Item.TYPE_SCRIPT,
            Item.TYPE_PLUGIN
        ]
        self.pluginDisplayList = [
            Item.TYPE_PLUGIN_MUSIC, Item.TYPE_PLUGIN_PICTURES,
            Item.TYPE_PLUGIN_PROGRAMS, Item.TYPE_PLUGIN_VIDEO
        ]
        self.scraperDisplayList = [
            Item.TYPE_SCRAPER_MUSIC, Item.TYPE_SCRAPER_VIDEO
        ]

        self.connected = False  # status de la connection ( inutile pour le moment )
        self.index = ""
        self.rightstest = ""
        self.CACHEDIR = self.configManager.CACHEDIR

        # Connection to FTP server
        try:

            self.passionFTPCtrl = FtpDownloadCtrl(self.host, self.user,
                                                  self.password,
                                                  self.remotedirList,
                                                  self.CACHEDIR)
            self.connected = True
        except:
            print "PassionFtpBrowser::__init__: Exception durant la connection FTP"
            print "Impossible de se connecter au serveur FTP: %s" % self.host
            print_exc()

        # Creons ItemInfosManager afin de recuperer les descriptions des items
        self.itemInfosManager = ItemInfosManager(mainwin=self)
        self.infoswarehouse = self.itemInfosManager.get_info_warehouse()
Esempio n. 4
0
    def __init__(self, *args, **kwargs):
        Browser.__init__(self, *args, **kwargs)

        # Creation du configCtrl
        from CONF import configCtrl

        self.configManager = configCtrl()
        if not self.configManager.is_conf_valid:
            raise

        self.host = self.configManager.host
        self.user = self.configManager.user
        self.password = self.configManager.password
        self.remotedirList = self.configManager.remotedirList

        # self.localdirList       = self.configManager.localdirList
        # self.downloadTypeList   = self.configManager.downloadTypeLst

        self.racineDisplayList = [Item.TYPE_SKIN, Item.TYPE_SCRAPER, Item.TYPE_SCRIPT, Item.TYPE_PLUGIN]
        self.pluginDisplayList = [
            Item.TYPE_PLUGIN_MUSIC,
            Item.TYPE_PLUGIN_PICTURES,
            Item.TYPE_PLUGIN_PROGRAMS,
            Item.TYPE_PLUGIN_VIDEO,
        ]
        self.scraperDisplayList = [Item.TYPE_SCRAPER_MUSIC, Item.TYPE_SCRAPER_VIDEO]

        self.connected = False  # status de la connection ( inutile pour le moment )
        self.index = ""
        self.rightstest = ""
        self.CACHEDIR = self.configManager.CACHEDIR

        # Connection to FTP server
        try:

            self.passionFTPCtrl = FtpDownloadCtrl(
                self.host, self.user, self.password, self.remotedirList, self.CACHEDIR
            )
            self.connected = True
        except:
            print "PassionFtpBrowser::__init__: Exception durant la connection FTP"
            print "Impossible de se connecter au serveur FTP: %s" % self.host
            print_exc()

        # Creons ItemInfosManager afin de recuperer les descriptions des items
        self.itemInfosManager = ItemInfosManager(mainwin=self)
        self.infoswarehouse = self.itemInfosManager.get_info_warehouse()