def stopPushButtonPressed(self, button):

        # cancel shut down progress
        dictionary = {
            'category': self.video_finder_plus_gid,
            'shutdown': 'canceled'
        }

        self.parent.temp_db.updateQueueTable(dictionary)

        answer = download.downloadStop(self.gid, self.parent)

        # 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(QCoreApplication.translate("progress_src_ui_tr",
                                                      "Aria2 disconnected!"),
                           QCoreApplication.translate(
                               "progress_src_ui_tr",
                               "Persepolis is trying to connect! be patient!"),
                           10000,
                           'warning',
                           parent=self.parent)
Beispiel #2
0
 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)
Beispiel #3
0
    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)
Beispiel #4
0
    def resumePushButtonPressed(self, button):
        if self.status == "paused":
            answer = download.downloadUnpause(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()
                    notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 disconnected!"), QCoreApplication.translate("progress_src_ui_tr", "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", "Please try again."), 10000,
                               'warning', parent=self.parent)
Beispiel #5
0
    def resumePushButtonPressed(self, button):
        if self.status == STATUS.DOWNLOAD.PAUSED:
            answer = download.downloadUnpause(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()
                    notifySend(QCoreApplication.translate("progress_src_ui_tr", "Aria2 disconnected!"), QCoreApplication.translate("progress_src_ui_tr", "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", "Please try again."), 10000,
                               'warning', parent=self.parent)
Beispiel #6
0
    def resumePushButtonPressed(self, button):
        if self.status == "paused":
            answer = download.downloadUnpause(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()
                    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,
                               'warning', systemtray=self.parent.system_tray_icon)
Beispiel #7
0
    def stopPushButtonPressed(self, button):
        dict = {'gid': self.gid,
                'shutdown': 'canceled'}

        self.parent.temp_db.updateSingleTable(dict)


        answer = download.downloadStop(self.gid, self.parent)
# 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(QCoreApplication.translate("progress_src_ui_tr", "Aria2 disconnected!"), QCoreApplication.translate("progress_src_ui_tr", "Persepolis is trying to connect! be patient!"),
                           10000, 'warning', parent=self.parent)