reconnect fritz.Box also before downloading from uploaded.to without account
authorNabil Hanna <ali@users.schwerkraft.elitedvb.net>
Sat, 5 Dec 2009 14:19:00 +0000 (14:19 +0000)
committerNabil Hanna <ali@users.schwerkraft.elitedvb.net>
Sat, 5 Dec 2009 14:19:00 +0000 (14:19 +0000)
rsdownloader/src/plugin.py

index 118c956..b732f8c 100644 (file)
@@ -173,6 +173,7 @@ def matchGet(rex, string):
 ##############################################################################\r
 \r
 def reconnect(host='fritz.box', port=49000):\r
+       writeLog("Reconnecting fritz.Box...")\r
        http_body = '\r\n'.join((\r
                '<?xml version="1.0" encoding="utf-8"?>',\r
                '<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">',\r
@@ -232,7 +233,6 @@ class RSDownload:
                        writeLog("Free RS-Download: %s"%self.url)\r
                        self.status = _("Checking")\r
                        if config.plugins.RSDownloader.reconnect_fritz.value and self.mayReconnect():\r
-                               writeLog("Reconnecting fritz.Box...")\r
                                reconnect()\r
                                sleep(3)\r
                        data = get(self.url)\r
@@ -259,7 +259,7 @@ class RSDownload:
                elif self.url.__contains__("uploaded.to") or self.url.__contains__("ul.to") and ul_username == "" and ul_password == "":
                        writeLog("Free Uploaded.to-Download: %s"%self.url)\r
                        self.status = _("Checking")\r
-                       if config.plugins.RSDownloader.reconnect_fritz.value:\r
+                       if config.plugins.RSDownloader.reconnect_fritz.value and self.mayReconnect():\r
                                reconnect()\r
                                sleep(3)\r
                        data = get(self.url)