def stopPushButtonPressed(self, button): answer = download.downloadStop(self.gid) if answer == 'None': notifySend("Aria2 did not respond!", "Try agian!", 10000, 'critical', systemtray=self.parent.system_tray_icon)
def pausePushButtonPressed(self, button): if self.status == "downloading": answer = download.downloadPause(self.gid) #if aria2 did not respond , then this function is checking for aria2 availability , and if aria2 disconnected then aria2Disconnected is executed if answer == 'None': version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() download.downloadStop(self.gid) notifySend("Aria2 disconnected!", "Persepolis is trying to connect!be patient!", 10000, 'warning', systemtray=self.parent.system_tray_icon) else: notifySend("Aria2 did not respond!", "Try agian!", 10000, 'critical', systemtray=self.parent.system_tray_icon)
def stopPushButtonPressed(self, button): answer = download.downloadStop(self.gid) #if aria2 did not respond , then this function is checking for aria2 availability , and if aria2 disconnected then aria2Disconnected is executed if answer == 'None': version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() notifySend("Aria2 disconnected!", "Persepolis is trying to connect!be patient!", 10000, 'warning', systemtray=self.parent.system_tray_icon)
def stopButtonPressed(self,button): selected_row_return = self.selectedRow() if selected_row_return != None: gid = self.download_table.item(selected_row_return , 8 ).text() answer = download.downloadStop(gid) if answer == 'None': notifySend("Aria2 did not respond!","Try agian!" , 10000 , 'critical' ) else: self.statusbar.showMessage("Please select an item first!")
def stopButtonPressed(self,button): self.stopAction.setEnabled(False) selected_row_return = self.selectedRow() if selected_row_return != None: gid = self.download_table.item(selected_row_return , 8 ).text() answer = download.downloadStop(gid) if answer == 'None': notifySend("Aria2 did not respond!","Try agian!" , 10000 , 'critical' , systemtray = self.system_tray_icon ) else: self.statusbar.showMessage("Please select an item first!")
def stopAllDownloads(self,menu): active_gids = [] for i in range(self.download_table.rowCount()): try: row_status = self.download_table.item(i , 1).text() if row_status == 'downloading' or row_status == 'paused' or row_status == 'waiting': row_gid = self.download_table.item(i , 8).text() active_gids.append(row_gid) except : pass for gid in active_gids: answer = download.downloadStop(gid) if answer == 'None': notifySend("Aria2 did not respond!" , "Try agian!" , 10000 , 'critical' , systemtray = self.system_tray_icon ) sleep(0.3)
def stopAllDownloads(self,menu): active_gids = [] for i in range(self.download_table.rowCount()): try: row_status = self.download_table.item(i , 1).text() if row_status == 'downloading' or row_status == 'paused' or row_status == 'waiting': row_gid = self.download_table.item(i , 8).text() active_gids.append(row_gid) except : pass for gid in active_gids: answer = download.downloadStop(gid) if answer == 'None': notifySend("Aria2 did not respond!" , "Try agian!" , 10000 , 'critical' ) sleep(0.3)
def stopPushButtonPressed(self,button): answer = download.downloadStop(self.gid) if answer == 'None': notifySend("Aria2 did not respond!","Try agian!" , 10000 , 'critical' )