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 not (answer): version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() download.downloadStop(self.gid, self.parent) notifySend("Aria2 disconnected!", "Persepolis is trying to connect! be patient!", 10000, 'warning', parent=self.parent) else: notifySend( QCoreApplication.translate("progress_src_ui_tr", "Aria2 did not respond!"), QCoreApplication.translate("progress_src_ui_tr", "Try again!"), 10000, 'critical', parent=self.parent)
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 not(answer): version_answer = download.aria2Version() if version_answer == 'did not respond': self.parent.aria2Disconnected() download.downloadStop(self.gid, self.parent) notifySend("Aria2 disconnected!", "Persepolis is trying to connect! be patient!", 10000, 'warning', parent=self.parent) else: notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 did not respond!"), QCoreApplication.translate("progress_src_ui_tr", "Try again!"), 10000, 'critical', parent=self.parent)
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)