diff options
Diffstat (limited to 'mageiaSync/mageiasync.py')
-rw-r--r-- | mageiaSync/mageiasync.py | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py index a871e12..06b7177 100644 --- a/mageiaSync/mageiasync.py +++ b/mageiaSync/mageiasync.py @@ -209,19 +209,25 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): self.timeRemaining.setTime(content) def manualChecks(self): - for iso in self.modelRemote.selectedItems(): - path,name=iso.text().split('/') - try: - # Look for ISO in local list - item=self.model.findItems(name,QtCore.Qt.MatchExactly,1)[0] - except: - # Remote ISO is not yet in local directory. We add it in localList and create the directory - self.localAdd(path,name,0) - basedir=QtCore.QDir(self.destination) - basedir.mkdir(path) - item=self.model.findItems(name,QtCore.Qt.MatchExactly,1)[0] - row=self.model.indexFromItem(item).row() - self.checks(row) + remoteRow=-1 + for isoIndex in self.listIsos.selectionModel().selectedIndexes(): + if remoteRow != isoIndex.row(): + remoteRow = isoIndex.row() + path = self.modelRemote.data(self.modelRemote.index(remoteRow,0)) + name = self.modelRemote.data(self.modelRemote.index(remoteRow,1)) + print(remoteRow,path,name) + try: + # Look for ISO in local list + item=self.model.findItems(name,QtCore.Qt.MatchExactly,1)[0] + except: + # Remote ISO is not yet in local directory. We add it in localList and create the directory + self.localAdd(path,name,0) + basedir=QtCore.QDir(self.destination) + basedir.mkdir(path) + item=self.model.findItems(name,QtCore.Qt.MatchExactly,1)[0] + row=self.model.indexFromItem(item).row() + print(self.model.data(self.model.index(row,0)), row) + self.checks(row) def checks(self,isoIndex): # processes a checking for each iso @@ -478,7 +484,7 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): def help(self): # Open page in browser - l = QDesktopServices.openUrl(QUrl('http://wiki.mageia.org/en/MageiaSync')) + l = QDesktopServices.openUrl(QUrl('https://wiki.mageia.org/en/ISO_testing_rsync_tools')) def launchSync(self): self.IprogressBar.setEnabled(True) @@ -493,8 +499,8 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): for isoIndex in self.listIsos.selectionModel().selectedIndexes(): if remoteRow != isoIndex.row(): remoteRow = isoIndex.row() - path = self.model.data(self.model.index(remoteRow,0)) - name = self.model.data(self.model.index(remoteRow,1)) + path = self.modelRemote.data(self.modelRemote.index(remoteRow,0)) + name = self.modelRemote.data(self.modelRemote.index(remoteRow,1)) try: # Look for ISO in local list item=self.model.findItems(name,QtCore.Qt.MatchExactly,1)[0] @@ -513,9 +519,6 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): self.nameWithPath+='/' self.rsyncThread.setup(self.nameWithPath, self.destination+'/'+path+'/',row) self.rsyncThread.start() # start the thread - # Pour les tests uniquement - #rsync://$user@bcd.mageia.org/isos/$release/ - #self.nameWithPath='rsync://ftp5.gwdg.de/pub/linux/mageia/iso/4.1/Mageia-4.1-LiveCD-GNOME-en-i586-CD/' def closeFill(self,code): if code==0: # list returned |