diff options
| author | 2010-02-02 22:19:59 +0100 | |
|---|---|---|
| committer | 2010-02-02 22:19:59 +0100 | |
| commit | 99da0e18722d9343a274e9a96376969a469e3a95 (patch) | |
| tree | b612118af4ed934c46d46500960b3ec16f2c09a0 | |
| parent | Fixed time compare thanks prophy (diff) | |
| parent | merge (diff) | |
| download | pyload-99da0e18722d9343a274e9a96376969a469e3a95.tar.xz | |
merge no2
| -rw-r--r-- | locale/de/de.po | 219 | ||||
| -rw-r--r-- | locale/en/en.po | 219 | ||||
| -rw-r--r-- | locale/fr/fr.po | 215 | ||||
| -rw-r--r-- | locale/messages.pot | 191 | ||||
| -rw-r--r-- | module/PullEvents.py | 111 | ||||
| -rw-r--r-- | module/download_thread.py | 54 | ||||
| -rw-r--r-- | module/file_list.py | 28 | ||||
| -rw-r--r-- | module/gui/Collector.py | 237 | ||||
| -rw-r--r-- | module/gui/Queue.py | 135 | ||||
| -rw-r--r-- | module/gui/connector.py | 22 | ||||
| -rw-r--r-- | module/plugins/container/CCF.py | 18 | ||||
| -rw-r--r-- | module/plugins/decrypter/SerienjunkiesOrg.py | 1 | ||||
| -rw-r--r-- | module/thread_list.py | 57 | ||||
| -rwxr-xr-x | pyLoadCore.py | 45 | ||||
| -rwxr-xr-x | pyLoadGui.py | 16 | ||||
| -rw-r--r-- | systemCheck.py | 158 | 
16 files changed, 1316 insertions, 410 deletions
| diff --git a/locale/de/de.po b/locale/de/de.po index 471d543cf..1994499df 100644 --- a/locale/de/de.po +++ b/locale/de/de.po @@ -4,69 +4,202 @@  #  msgid ""  msgstr "" -"Project-Id-Version: 0.1\n" -"POT-Creation-Date: 2009-06-04 15:33+CEST\n" -"PO-Revision-Date: 2009-06-05 18:27+0100\n" -"Last-Translator: spoob <spoob@gmx.de>\n" -"Language-Team: pyLoad <LL@li.org>\n" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-02-02 21:54+CET\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n"  "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n"  "Generated-By: pygettext.py 1.5\n" -#: Core.py:59 + +#: module/download_thread.py:115 +msgid "Hoster unvailable, wait 60 seconds" +msgstr "" + +#: module/download_thread.py:117 +msgid "Error getting error code: %s" +msgstr "" + +#: module/download_thread.py:163 +msgid "Checksum ok ('%s')" +msgstr "" + +#: module/download_thread.py:165 +msgid "Checksum not matched! ('%s')" +msgstr "" + +#: module/download_thread.py:167 +msgid "Can't get checksum for %s" +msgstr "" + +#: module/download_thread.py:169 +msgid "Checksum not implemented for %s" +msgstr "" + +#: module/file_list.py:87 +msgid "Found %s links in linkcollector" +msgstr "" + +#: module/file_list.py:89 +msgid "Found %s unqueued packages" +msgstr "" + +#: module/file_list.py:91 +msgid "Added %s packages to queue" +msgstr "" + +#: module/thread_list.py:88 +msgid "Get links from: %s" +msgstr "" + +#: module/thread_list.py:90 +msgid "Download starts: %s" +msgstr "" + +#: module/thread_list.py:136 +msgid "Parsed links from %s: %i" +msgstr "" + +#: module/thread_list.py:138 +msgid "No links in %s" +msgstr "" + +#: module/thread_list.py:145 +msgid "Download finished: %s" +msgstr "" + +#: module/thread_list.py:151 +msgid "Download failed: %s | %s" +msgstr "" + +#: module/thread_list.py:156 +msgid "Download aborted: %s" +msgstr "" + +#: module/thread_list.py:206 +msgid "Starting reconnect" +msgstr "" + +#: module/thread_list.py:220 +msgid "Reconnected, new IP: %s" +msgstr "" + +#: pyLoadCore.py:111 +msgid "pycrypto to decode container files" +msgstr "" + +#: pyLoadCore.py:112 +msgid "Python Image Libary (PIL) for captha reading" +msgstr "" + +#: pyLoadCore.py:113 +msgid "pycurl for lower memory footprint while downloading" +msgstr "" + +#: pyLoadCore.py:114 +msgid "Django for webinterface" +msgstr "" + +#: pyLoadCore.py:115 +msgid "tesseract for captcha reading" +msgstr "" + +#: pyLoadCore.py:116 +msgid "gocr for captcha reading" +msgstr "" + +#: pyLoadCore.py:118  msgid "folder for logs" -msgstr "Ordner für Logs" +msgstr "" -#: Core.py:60 +#: pyLoadCore.py:119  msgid "folder for downloads" -msgstr "Ordner für Downloads" +msgstr "" -#: Core.py:61 +#: pyLoadCore.py:120  msgid "file for links" -msgstr "Linkdatei" +msgstr "" -#: Core.py:62 +#: pyLoadCore.py:121  msgid "file for failed links" -msgstr "Datei für felgeschlagene Links" +msgstr "" -#: Core.py:68 +#: pyLoadCore.py:124 +msgid "OpenSSL for secure connection" +msgstr "" + +#: pyLoadCore.py:125 +msgid "ssl certificate" +msgstr "" + +#: pyLoadCore.py:126 +msgid "ssl key" +msgstr "" + +#: pyLoadCore.py:150  msgid "Downloadtime: %s" -msgstr "Downloadzeit: %s" +msgstr "" -#: Core.py:96 -msgid "added" -msgstr "Hinzugefügt" +#: pyLoadCore.py:179 +msgid "restarting pyLoad" +msgstr "" -#: Core.py:97 -msgid "created index of plugins" -msgstr "Plugin Index erstellt" +#: pyLoadCore.py:183 +msgid "pyLoad quits" +msgstr "" -#: Core.py:119 -msgid "new update %s on pyload.org" -msgstr "Neue Version %s auf pyload.org verfügbar!" +#: pyLoadCore.py:194 +msgid "Secure XMLRPC Server Started" +msgstr "" -#: Core.py:121 -msgid "newst version %s in use:" -msgstr "Neueste Version %s in Benutzung" +#: pyLoadCore.py:197 +msgid "Auth XMLRPC Server Started" +msgstr "" -#: Core.py:123 -msgid "beta version %s in use:" -msgstr "Beta Version %s in Benutzung" +#: pyLoadCore.py:203 +msgid "Failed starting XMLRPC server, CLI and GUI will not be available: %s" +msgstr "" -#: Core.py:132 +#: pyLoadCore.py:272  msgid "%s created" -msgstr "%s erstellt" +msgstr "" + +#: pyLoadCore.py:275 +msgid "could not find %s: %s" +msgstr "" + +#: pyLoadCore.py:277 +msgid "could not create %s: %s" +msgstr "" + +#: pyLoadCore.py:305 +msgid "%s added" +msgstr "" -#: Core.py:134 -msgid "could not create %s" -msgstr "Konnte %s nicht erstellen" +#: pyLoadCore.py:306 +msgid "created index of plugins" +msgstr "" + +#: pyLoadCore.py:325 +msgid "shutting down..." +msgstr "" + +#: pyLoadCore.py:341 +msgid "No Updates for pyLoad" +msgstr "" -#: Core.py:194 -msgid "%i seconds" -msgstr "%i Sekunden" +#: pyLoadCore.py:344 +msgid "New pyLoad Version %s available" +msgstr "" -#: Core.py:222 -msgid "Server Mode" -msgstr "Servermodus" +#: pyLoadCore.py:369 +msgid "Auto install Failed" +msgstr "" + +#: pyLoadCore.py:607 +msgid "killed pyLoad from Terminal" +msgstr "" diff --git a/locale/en/en.po b/locale/en/en.po index 87e646735..4d5bc4ee3 100644 --- a/locale/en/en.po +++ b/locale/en/en.po @@ -4,65 +4,206 @@  #  msgid ""  msgstr "" -"Project-Id-Version: 0.1\n" -"POT-Creation-Date: 2009-06-05 18:26+CEST\n" -"PO-Revision-Date: 2009-06-05 18:28+0100\n" -"Last-Translator: spoob <spoob@gmx.de>\n" -"Language-Team: pyLoad <LL@li.org>\n" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-02-02 21:54+CET\n" +"PO-Revision-Date: 2010-02-02 23:05+0200\n" +"Last-Translator: Marius <mkaay@mkaay.de>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: de\n"  "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n"  "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Pootle 2.0.0\n"  "Generated-By: pygettext.py 1.5\n" -#: Core.py:59 +#: module/download_thread.py:115 +msgid "Hoster unvailable, wait 60 seconds" +msgstr "Hoster unvailable, wait 60 seconds" + +#: module/download_thread.py:117 +msgid "Error getting error code: %s" +msgstr "Error getting error code: %s" + +#: module/download_thread.py:163 +msgid "Checksum ok ('%s')" +msgstr "Checksum ok ('%s')" + +#: module/download_thread.py:165 +msgid "Checksum not matched! ('%s')" +msgstr "Checksum not matched! ('%s')" + +#: module/download_thread.py:167 +msgid "Can't get checksum for %s" +msgstr "Can't get checksum for %s" + +#: module/download_thread.py:169 +msgid "Checksum not implemented for %s" +msgstr "Checksum not implemented for %s" + +#: module/file_list.py:87 +msgid "Found %s links in linkcollector" +msgstr "Found %s links in linkcollector" + +#: module/file_list.py:89 +msgid "Found %s unqueued packages" +msgstr "Found %s unqueued packages" + +#: module/file_list.py:91 +msgid "Added %s packages to queue" +msgstr "Added %s packages to queue" + +#: module/thread_list.py:88 +msgid "Get links from: %s" +msgstr "Get links from: %s" + +#: module/thread_list.py:90 +msgid "Download starts: %s" +msgstr "Download starts: %s" + +#: module/thread_list.py:136 +msgid "Parsed links from %s: %i" +msgstr "Parsed links from %s: %i" + +#: module/thread_list.py:138 +msgid "No links in %s" +msgstr "No links in %s" + +#: module/thread_list.py:145 +msgid "Download finished: %s" +msgstr "Download finished: %s" + +#: module/thread_list.py:151 +msgid "Download failed: %s | %s" +msgstr "Download failed: %s | %s" + +#: module/thread_list.py:156 +msgid "Download aborted: %s" +msgstr "Download aborted: %s" + +#: module/thread_list.py:206 +msgid "Starting reconnect" +msgstr "Starting reconnect" + +#: module/thread_list.py:220 +msgid "Reconnected, new IP: %s" +msgstr "Reconnected, new IP: %s" + +#: pyLoadCore.py:111 +msgid "pycrypto to decode container files" +msgstr "pycrypto to decode container files" + +#: pyLoadCore.py:112 +msgid "Python Image Libary (PIL) for captha reading" +msgstr "Python Image Libary (PIL) for captha reading" + +#: pyLoadCore.py:113 +msgid "pycurl for lower memory footprint while downloading" +msgstr "pycurl for lower memory footprint while downloading" + +#: pyLoadCore.py:114 +msgid "Django for webinterface" +msgstr "Django for webinterface" + +#: pyLoadCore.py:115 +msgid "tesseract for captcha reading" +msgstr "tesseract for captcha reading" + +#: pyLoadCore.py:116 +msgid "gocr for captcha reading" +msgstr "gocr for captcha reading" + +#: pyLoadCore.py:118  msgid "folder for logs" -msgstr "" +msgstr "folder for logs" -#: Core.py:60 +#: pyLoadCore.py:119  msgid "folder for downloads" -msgstr "" +msgstr "folder for downloads" -#: Core.py:61 +#: pyLoadCore.py:120  msgid "file for links" -msgstr "" +msgstr "file for links" -#: Core.py:62 +#: pyLoadCore.py:121  msgid "file for failed links" -msgstr "" +msgstr "file for failed links" + +#: pyLoadCore.py:124 +msgid "OpenSSL for secure connection" +msgstr "OpenSSL for secure connection" + +#: pyLoadCore.py:125 +msgid "ssl certificate" +msgstr "ssl certificate" + +#: pyLoadCore.py:126 +msgid "ssl key" +msgstr "ssl key" -#: Core.py:68 +#: pyLoadCore.py:150  msgid "Downloadtime: %s" -msgstr "" +msgstr "Downloadtime: %s" -#: Core.py:96 -msgid " added" -msgstr "" +#: pyLoadCore.py:179 +msgid "restarting pyLoad" +msgstr "restarting pyLoad" -#: Core.py:97 -msgid "created index of plugins" -msgstr "" +#: pyLoadCore.py:183 +msgid "pyLoad quits" +msgstr "pyLoad quits" -#: Core.py:119 -msgid "new update %s on pyload.org" -msgstr "" +#: pyLoadCore.py:194 +msgid "Secure XMLRPC Server Started" +msgstr "Secure XMLRPC Server Started" -#: Core.py:121 -msgid "newst version %s in use:" -msgstr "" +#: pyLoadCore.py:197 +msgid "Auth XMLRPC Server Started" +msgstr "Auth XMLRPC Server Started" -#: Core.py:123 -msgid "beta version %s in use:" -msgstr "" +#~ msgid "Failed starting socket server, CLI and GUI will not be available: %s" +#~ msgstr "" -#: Core.py:132 +#: pyLoadCore.py:272  msgid "%s created" -msgstr "" +msgstr "%s created" -#: Core.py:194 -msgid "%i seconds" -msgstr "" +#: pyLoadCore.py:275 +msgid "could not find %s: %s" +msgstr "could not find %s: %s" -#: Core.py:222 -msgid "Server Mode" -msgstr "" +#: pyLoadCore.py:277 +msgid "could not create %s: %s" +msgstr "could not create %s: %s" + +#: pyLoadCore.py:305 +msgid "%s added" +msgstr "%s added" + +#: pyLoadCore.py:306 +msgid "created index of plugins" +msgstr "created index of plugins" + +#: pyLoadCore.py:325 +msgid "shutting down..." +msgstr "shutting down..." + +#: pyLoadCore.py:341 +msgid "No Updates for pyLoad" +msgstr "No Updates for pyLoad" + +#: pyLoadCore.py:344 +msgid "New pyLoad Version %s available" +msgstr "New pyLoad Version %s available" + +#: pyLoadCore.py:369 +msgid "Auto install Failed" +msgstr "Auto install Failed" + +#: pyLoadCore.py:607 +msgid "killed pyLoad from Terminal" +msgstr "killed pyLoad from Terminal" +#: pyLoadCore.py:203 +msgid "Failed starting XMLRPC server, CLI and GUI will not be available: %s" +msgstr "Failed starting XMLRPC server, CLI and GUI will not be available: %s" diff --git a/locale/fr/fr.po b/locale/fr/fr.po index fbe233952..1994499df 100644 --- a/locale/fr/fr.po +++ b/locale/fr/fr.po @@ -5,64 +5,201 @@  msgid ""  msgstr ""  "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2009-06-04 15:33+CEST\n" -"PO-Revision-Date: 2009-06-04 23:09+0100\n" -"Last-Translator: spoob <spoob@gmx.de>\n" +"POT-Creation-Date: 2010-02-02 21:54+CET\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"  "Language-Team: LANGUAGE <LL@li.org>\n"  "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n"  "Generated-By: pygettext.py 1.5\n" -#: Core.py:59 + +#: module/download_thread.py:115 +msgid "Hoster unvailable, wait 60 seconds" +msgstr "" + +#: module/download_thread.py:117 +msgid "Error getting error code: %s" +msgstr "" + +#: module/download_thread.py:163 +msgid "Checksum ok ('%s')" +msgstr "" + +#: module/download_thread.py:165 +msgid "Checksum not matched! ('%s')" +msgstr "" + +#: module/download_thread.py:167 +msgid "Can't get checksum for %s" +msgstr "" + +#: module/download_thread.py:169 +msgid "Checksum not implemented for %s" +msgstr "" + +#: module/file_list.py:87 +msgid "Found %s links in linkcollector" +msgstr "" + +#: module/file_list.py:89 +msgid "Found %s unqueued packages" +msgstr "" + +#: module/file_list.py:91 +msgid "Added %s packages to queue" +msgstr "" + +#: module/thread_list.py:88 +msgid "Get links from: %s" +msgstr "" + +#: module/thread_list.py:90 +msgid "Download starts: %s" +msgstr "" + +#: module/thread_list.py:136 +msgid "Parsed links from %s: %i" +msgstr "" + +#: module/thread_list.py:138 +msgid "No links in %s" +msgstr "" + +#: module/thread_list.py:145 +msgid "Download finished: %s" +msgstr "" + +#: module/thread_list.py:151 +msgid "Download failed: %s | %s" +msgstr "" + +#: module/thread_list.py:156 +msgid "Download aborted: %s" +msgstr "" + +#: module/thread_list.py:206 +msgid "Starting reconnect" +msgstr "" + +#: module/thread_list.py:220 +msgid "Reconnected, new IP: %s" +msgstr "" + +#: pyLoadCore.py:111 +msgid "pycrypto to decode container files" +msgstr "" + +#: pyLoadCore.py:112 +msgid "Python Image Libary (PIL) for captha reading" +msgstr "" + +#: pyLoadCore.py:113 +msgid "pycurl for lower memory footprint while downloading" +msgstr "" + +#: pyLoadCore.py:114 +msgid "Django for webinterface" +msgstr "" + +#: pyLoadCore.py:115 +msgid "tesseract for captcha reading" +msgstr "" + +#: pyLoadCore.py:116 +msgid "gocr for captcha reading" +msgstr "" + +#: pyLoadCore.py:118  msgid "folder for logs" -msgstr "Dossier pour des logs" +msgstr "" -#: Core.py:60 +#: pyLoadCore.py:119  msgid "folder for downloads" -msgstr "Dossier téléchargement" +msgstr "" -#: Core.py:61 +#: pyLoadCore.py:120  msgid "file for links" -msgstr "Fichier du lien hypertexte" +msgstr "" -#: Core.py:68 +#: pyLoadCore.py:121 +msgid "file for failed links" +msgstr "" + +#: pyLoadCore.py:124 +msgid "OpenSSL for secure connection" +msgstr "" + +#: pyLoadCore.py:125 +msgid "ssl certificate" +msgstr "" + +#: pyLoadCore.py:126 +msgid "ssl key" +msgstr "" + +#: pyLoadCore.py:150  msgid "Downloadtime: %s" -msgstr "Temp du téléchargement: %s" +msgstr "" -#: Core.py:96 -msgid " added" -msgstr "Ajouté." +#: pyLoadCore.py:179 +msgid "restarting pyLoad" +msgstr "" -#: Core.py:97 -msgid "created index of plugins" -msgstr "Un indice des Plugins a été créé." +#: pyLoadCore.py:183 +msgid "pyLoad quits" +msgstr "" -#: Core.py:119 -msgid "new update %s on pyload.org" -msgstr "Il y a un mise à jour - pyLoad %s - sur pyload.org" +#: pyLoadCore.py:194 +msgid "Secure XMLRPC Server Started" +msgstr "" -#: Core.py:121 -msgid "newst version %s in use:" -msgstr "Tu utilises la version %s." +#: pyLoadCore.py:197 +msgid "Auth XMLRPC Server Started" +msgstr "" -#: Core.py:123 -msgid "beta version %s in use:" -msgstr "Tu utilises pyLoad %s - une version beta." +#: pyLoadCore.py:203 +msgid "Failed starting XMLRPC server, CLI and GUI will not be available: %s" +msgstr "" -#: Core.py:132 +#: pyLoadCore.py:272  msgid "%s created" -msgstr "%s a été créé." +msgstr "" -#: Core.py:134 -msgid "could not create %s" -msgstr "Il était impossible de créer %s." +#: pyLoadCore.py:275 +msgid "could not find %s: %s" +msgstr "" -#: Core.py:194 -msgid "%i seconds" -msgstr "%s secondes." +#: pyLoadCore.py:277 +msgid "could not create %s: %s" +msgstr "" + +#: pyLoadCore.py:305 +msgid "%s added" +msgstr "" -#: Core.py:222 -msgid "Server Mode" -msgstr "Mode de Serveur." +#: pyLoadCore.py:306 +msgid "created index of plugins" +msgstr "" + +#: pyLoadCore.py:325 +msgid "shutting down..." +msgstr "" + +#: pyLoadCore.py:341 +msgid "No Updates for pyLoad" +msgstr "" + +#: pyLoadCore.py:344 +msgid "New pyLoad Version %s available" +msgstr "" + +#: pyLoadCore.py:369 +msgid "Auto install Failed" +msgstr "" + +#: pyLoadCore.py:607 +msgid "killed pyLoad from Terminal" +msgstr "" diff --git a/locale/messages.pot b/locale/messages.pot index 87e646735..1994499df 100644 --- a/locale/messages.pot +++ b/locale/messages.pot @@ -4,65 +4,202 @@  #  msgid ""  msgstr "" -"Project-Id-Version: 0.1\n" -"POT-Creation-Date: 2009-06-05 18:26+CEST\n" -"PO-Revision-Date: 2009-06-05 18:28+0100\n" -"Last-Translator: spoob <spoob@gmx.de>\n" -"Language-Team: pyLoad <LL@li.org>\n" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2010-02-02 21:54+CET\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n"  "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n"  "Generated-By: pygettext.py 1.5\n" -#: Core.py:59 + +#: module/download_thread.py:115 +msgid "Hoster unvailable, wait 60 seconds" +msgstr "" + +#: module/download_thread.py:117 +msgid "Error getting error code: %s" +msgstr "" + +#: module/download_thread.py:163 +msgid "Checksum ok ('%s')" +msgstr "" + +#: module/download_thread.py:165 +msgid "Checksum not matched! ('%s')" +msgstr "" + +#: module/download_thread.py:167 +msgid "Can't get checksum for %s" +msgstr "" + +#: module/download_thread.py:169 +msgid "Checksum not implemented for %s" +msgstr "" + +#: module/file_list.py:87 +msgid "Found %s links in linkcollector" +msgstr "" + +#: module/file_list.py:89 +msgid "Found %s unqueued packages" +msgstr "" + +#: module/file_list.py:91 +msgid "Added %s packages to queue" +msgstr "" + +#: module/thread_list.py:88 +msgid "Get links from: %s" +msgstr "" + +#: module/thread_list.py:90 +msgid "Download starts: %s" +msgstr "" + +#: module/thread_list.py:136 +msgid "Parsed links from %s: %i" +msgstr "" + +#: module/thread_list.py:138 +msgid "No links in %s" +msgstr "" + +#: module/thread_list.py:145 +msgid "Download finished: %s" +msgstr "" + +#: module/thread_list.py:151 +msgid "Download failed: %s | %s" +msgstr "" + +#: module/thread_list.py:156 +msgid "Download aborted: %s" +msgstr "" + +#: module/thread_list.py:206 +msgid "Starting reconnect" +msgstr "" + +#: module/thread_list.py:220 +msgid "Reconnected, new IP: %s" +msgstr "" + +#: pyLoadCore.py:111 +msgid "pycrypto to decode container files" +msgstr "" + +#: pyLoadCore.py:112 +msgid "Python Image Libary (PIL) for captha reading" +msgstr "" + +#: pyLoadCore.py:113 +msgid "pycurl for lower memory footprint while downloading" +msgstr "" + +#: pyLoadCore.py:114 +msgid "Django for webinterface" +msgstr "" + +#: pyLoadCore.py:115 +msgid "tesseract for captcha reading" +msgstr "" + +#: pyLoadCore.py:116 +msgid "gocr for captcha reading" +msgstr "" + +#: pyLoadCore.py:118  msgid "folder for logs"  msgstr "" -#: Core.py:60 +#: pyLoadCore.py:119  msgid "folder for downloads"  msgstr "" -#: Core.py:61 +#: pyLoadCore.py:120  msgid "file for links"  msgstr "" -#: Core.py:62 +#: pyLoadCore.py:121  msgid "file for failed links"  msgstr "" -#: Core.py:68 +#: pyLoadCore.py:124 +msgid "OpenSSL for secure connection" +msgstr "" + +#: pyLoadCore.py:125 +msgid "ssl certificate" +msgstr "" + +#: pyLoadCore.py:126 +msgid "ssl key" +msgstr "" + +#: pyLoadCore.py:150  msgid "Downloadtime: %s"  msgstr "" -#: Core.py:96 -msgid " added" +#: pyLoadCore.py:179 +msgid "restarting pyLoad"  msgstr "" -#: Core.py:97 -msgid "created index of plugins" +#: pyLoadCore.py:183 +msgid "pyLoad quits"  msgstr "" -#: Core.py:119 -msgid "new update %s on pyload.org" +#: pyLoadCore.py:194 +msgid "Secure XMLRPC Server Started"  msgstr "" -#: Core.py:121 -msgid "newst version %s in use:" +#: pyLoadCore.py:197 +msgid "Auth XMLRPC Server Started"  msgstr "" -#: Core.py:123 -msgid "beta version %s in use:" +#: pyLoadCore.py:203 +msgid "Failed starting XMLRPC server, CLI and GUI will not be available: %s"  msgstr "" -#: Core.py:132 +#: pyLoadCore.py:272  msgid "%s created"  msgstr "" -#: Core.py:194 -msgid "%i seconds" +#: pyLoadCore.py:275 +msgid "could not find %s: %s" +msgstr "" + +#: pyLoadCore.py:277 +msgid "could not create %s: %s" +msgstr "" + +#: pyLoadCore.py:305 +msgid "%s added" +msgstr "" + +#: pyLoadCore.py:306 +msgid "created index of plugins" +msgstr "" + +#: pyLoadCore.py:325 +msgid "shutting down..." +msgstr "" + +#: pyLoadCore.py:341 +msgid "No Updates for pyLoad" +msgstr "" + +#: pyLoadCore.py:344 +msgid "New pyLoad Version %s available" +msgstr "" + +#: pyLoadCore.py:369 +msgid "Auto install Failed"  msgstr "" -#: Core.py:222 -msgid "Server Mode" +#: pyLoadCore.py:607 +msgid "killed pyLoad from Terminal"  msgstr "" diff --git a/module/PullEvents.py b/module/PullEvents.py new file mode 100644 index 000000000..7b23cf8b8 --- /dev/null +++ b/module/PullEvents.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- + +""" +    This program is free software; you can redistribute it and/or modify +    it under the terms of the GNU General Public License as published by +    the Free Software Foundation; either version 3 of the License, +    or (at your option) any later version. + +    This program is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +    See the GNU General Public License for more details. + +    You should have received a copy of the GNU General Public License +    along with this program; if not, see <http://www.gnu.org/licenses/>. +     +    @author: mkaay +""" + +from time import time + +class PullManager(): +    def __init__(self, core): +        self.core = core +        self.clients = [] +     +    def newClient(self, uuid): +        self.clients.append(Client(uuid)) +     +    def clean(self): +        for n, client in enumerate(self.clients): +            if client.lastActive + 30 < time(): +                del self.clients[n] +     +    def getEvents(self, uuid): +        events = [] +        validUuid = False +        for client in self.clients: +            if client.uuid == uuid: +                client.lastActive = time() +                validUuid = True +                while client.newEvents(): +                    events.append(client.popEvent().toList()) +                break +        if not validUuid: +            self.newClient(uuid) +            events = [ReloadAllEvent("queue").toList(), ReloadAllEvent("packages").toList(), ReloadAllEvent("collector").toList()] +        return events +     +    def addEvent(self, event): +        for client in self.clients: +            client.addEvent(event) + +class Client(): +    def __init__(self, uuid): +        self.uuid = uuid +        self.lastActive = time() +        self.events = [] +     +    def newEvents(self): +        return (len(self.events) > 0) +     +    def popEvent(self): +        if not len(self.events): +            return None +        return self.events.pop(0) +     +    def addEvent(self, event): +        self.events.append(event) + +class UpdateEvent(): +    def __init__(self, itype, iid, destination): +        assert itype == "pack" or itype == "file" +        assert destination == "queue" or destination == "collector" or destination == "packages" +        self.type = itype +        self.id = iid +        self.destination = destination +     +    def toList(self): +        return ["update", self.destination, self.type, self.id] + +class RemoveEvent(): +    def __init__(self, itype, iid, destination): +        assert itype == "pack" or itype == "file" +        assert destination == "queue" or destination == "collector" or destination == "packages" +        self.type = itype +        self.id = iid +        self.destination = destination +     +    def toList(self): +        return ["remove", self.destination, self.type, self.id] + +class InsertEvent(): +    def __init__(self, itype, iid, after, destination): +        assert itype == "pack" or itype == "file" +        assert destination == "queue" or destination == "collector" or destination == "packages" +        self.type = itype +        self.id = iid +        self.after = after +        self.destination = destination +     +    def toList(self): +        return ["insert", self.destination, self.type, self.id, self.after] + +class ReloadAllEvent(): +    def __init__(self, destination): +        assert destination == "queue" or destination == "collector" or destination == "packages" +        self.destination = destination +         +    def toList(self): +        return ["reload", self.destination] diff --git a/module/download_thread.py b/module/download_thread.py index 4a031a04c..7c899b185 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -1,28 +1,33 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# -#Copyright (C) 2009 sp00b, sebnapi -# -#This program is free software; you can redistribute it and/or modify -#it under the terms of the GNU General Public License as published by -#the Free Software Foundation; either version 3 of the License, -#or (at your option) any later version. -# -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -#See the GNU General Public License for more details. -# -#You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# -### + +""" +    This program is free software; you can redistribute it and/or modify +    it under the terms of the GNU General Public License as published by +    the Free Software Foundation; either version 3 of the License, +    or (at your option) any later version. + +    This program is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +    See the GNU General Public License for more details. + +    You should have received a copy of the GNU General Public License +    along with this program; if not, see <http://www.gnu.org/licenses/>. +     +    @author: mkaay +    @author: spoob +    @author: sebnapi +    @version: v0.3 +""" +  import threading  import traceback  from os.path import join  from time import sleep, time  from module.network.Request import AbortDownload +from module.PullEvents import UpdateEvent  class Status(object):      """ Saves all status information @@ -107,15 +112,16 @@ class Download_Thread(threading.Thread):                          code, msg = e                          if code == 7:                              sleep(60) -                        self.parent.parent.logger.info("Hoster unvailable, wait 60 seconds") +                        self.parent.parent.logger.info(_("Hoster unvailable, wait 60 seconds"))                      except Exception, f: -                        self.parent.parent.logger.debug("Error getting error code: "+ str(f)) +                        self.parent.parent.logger.debug(_("Error getting error code: %s") % f)                          if self.parent.parent.config['general']['debug_mode']:                              traceback.print_exc()                      self.loadedPyFile.status.type = "failed"                      self.loadedPyFile.status.error = str(e)                  finally:                      self.parent.job_finished(self.loadedPyFile) +                    self.parent.parent.pullManager.addEvent(UpdateEvent("file", self.loadedPyFile.id, "queue"))              else:                  sleep(3)              sleep(0.8) @@ -126,6 +132,7 @@ class Download_Thread(threading.Thread):      def download(self, pyfile):          status = pyfile.status          status.type = "starting" +        self.parent.parent.pullManager.addEvent(UpdateEvent("file", pyfile.id, "queue"))          pyfile.init_download() @@ -136,6 +143,7 @@ class Download_Thread(threading.Thread):              status.type = "decrypting"          else:              status.type = "downloading" +        self.parent.parent.pullManager.addEvent(UpdateEvent("file", pyfile.id, "queue"))          location = join(pyfile.folder, status.filename)          pyfile.plugin.proceed(status.url, location) @@ -152,13 +160,13 @@ class Download_Thread(threading.Thread):              20 - unknown error              """              if code == 0: -                self.parent.parent.logger.info("Checksum ok ('%s')" % status.filename) +                self.parent.parent.logger.info(_("Checksum ok ('%s')") % status.filename)              elif code == 1: -                self.parent.parent.logger.info("Checksum not matched! ('%s')" % status.filename) +                self.parent.parent.logger.info(_("Checksum not matched! ('%s')") % status.filename)              elif code == 5: -                self.parent.parent.logger.debug("Can't get checksum for %s" % status.filename) +                self.parent.parent.logger.debug(_("Can't get checksum for %s") % status.filename)              elif code == 10: -                self.parent.parent.logger.debug("Checksum not implemented for %s" % status.filename) +                self.parent.parent.logger.debug(_("Checksum not implemented for %s") % status.filename)              if not check:                  raise Checksum(code, location) diff --git a/module/file_list.py b/module/file_list.py index 7c68a7427..d251868b9 100644 --- a/module/file_list.py +++ b/module/file_list.py @@ -33,6 +33,8 @@ from operator import attrgetter  from os import sep  from time import sleep +from module.PullEvents import UpdateEvent, RemoveEvent, InsertEvent +  class NoSuchElementException(Exception):      pass @@ -82,11 +84,11 @@ class File_List(object):          self.lock.release()          if len(self.data["collector"]) > 0: -            self.core.logger.info("Found %s links in linkcollector" % len(self.data["collector"])) +            self.core.logger.info(_("Found %s links in linkcollector") % len(self.data["collector"]))          if len(self.data["packages"]) > 0: -            self.core.logger.info("Found %s unqueued packages" % len(self.data["packages"])) +            self.core.logger.info(_("Found %s unqueued packages") % len(self.data["packages"]))          if len(self.data["queue"]) > 0: -            self.core.logger.info("Added %s packages to queue" % len(self.data["queue"])) +            self.core.logger.info(_("Added %s packages to queue") % len(self.data["queue"]))      def save(self):          self.lock.acquire() @@ -148,6 +150,10 @@ class File_List(object):          info["size"] = pyfile.status.size()          info["active"] = pyfile.active          info["plugin"] = pyfile.plugin.props['name'] +        try: +            info["package"] = pypack.data["id"] +        except: +            pass          return info      def continueAborted(self): @@ -194,6 +200,7 @@ class File_List(object):              try:                  n, pyfile = collector._getFileFromID(id)                  del collector.file_list.data["collector"][n] +                collector.file_list.core.pullManager.addEvent(RemoveEvent("file", id, "collector"))              except Exception, e:                  raise Exception, e              else: @@ -211,6 +218,7 @@ class File_List(object):              collector.file_list.lock.acquire()              collector.file_list.data["collector"].append(pyfile)              collector.file_list.lock.release() +            collector.file_list.core.pullManager.addEvent(InsertEvent("file", pyfile.id, -2, "collector"))              return pyfile.id          def removeFile(collector, id): @@ -218,6 +226,7 @@ class File_List(object):                  removes PyLoadFile instance with the given id from collector              """              collector.popFile(id) +            collector.file_list.core.pullManager.addEvent(RemoveEvent("file", id, "collector"))          def replaceFile(collector, newpyfile):              """ @@ -227,6 +236,7 @@ class File_List(object):              try:                  n, pyfile = collector._getFileFromID(newpyfile.id)                  collector.file_list.data["collector"][n] = newpyfile +                collector.file_list.core.pullManager.addEvent(UpdateEvent("file", newpyfile.id, "collector"))              finally:                  collector.file_list.lock.release() @@ -277,6 +287,7 @@ class File_List(object):              if package_name is not None:                  pypack.data["package_name"] = package_name              packager.file_list.data["packages"].append(pypack) +            packager.file_list.core.pullManager.addEvent(InsertEvent("pack", pypack.data["id"], -2, "packages"))              return pypack.data["id"]          def removePackage(packager, id): @@ -287,6 +298,7 @@ class File_List(object):                      pyfile.plugin.req.abort = True                  sleep(0.1)                  del packager.file_list.data[key][n] +                packager.file_list.core.pullManager.addEvent(RemoveEvent("pack", id, key))              finally:                  packager.file_list.lock.release() @@ -312,6 +324,8 @@ class File_List(object):                  if key == "packages":                      del packager.file_list.data["packages"][n]                      packager.file_list.data["queue"].append(pypack) +                    packager.file_list.core.pullManager.addEvent(RemoveEvent("pack", id, "packages")) +                    packager.file_list.core.pullManager.addEvent(InsertEvent("pack", id, -2, "queue"))              finally:                  packager.file_list.lock.release() @@ -322,6 +336,8 @@ class File_List(object):                  if key == "queue":                      del packager.file_list.data["queue"][n]                      packager.file_list.data["packages"].append(pypack) +                    packager.file_list.core.pullManager.addEvent(RemoveEvent("pack", id, "queue")) +                    packager.file_list.core.pullManager.addEvent(InsertEvent("pack", id, -2, "packages"))              finally:                  packager.file_list.lock.release() @@ -334,6 +350,7 @@ class File_List(object):                  if folder is not None:                      pypack.data["folder"] = folder                  packager.file_list.data[key][n] = pypack +                packager.file_list.core.pullManager.addEvent(UpdateEvent("pack", id, key))              finally:                  packager.file_list.lock.release() @@ -352,6 +369,7 @@ class File_List(object):              pyfile.package = pypack              pypack.files.append(pyfile)              packager.file_list.data[key][n] = pypack +            packager.file_list.core.pullManager.addEvent(InsertEvent("file", pyfile.id, -2, key))          def resetFileStatus(packager, fileid):              packager.file_list.lock.acquire() @@ -359,6 +377,7 @@ class File_List(object):                  key, n, pyfile, pypack, pid = packager._getFileFromID(fileid)                  pyfile.init()                  pyfile.status.type = None +                packager.file_list.core.pullManager.addEvent(UpdateEvent("file", fileid, key))              finally:                  packager.file_list.lock.release() @@ -367,15 +386,16 @@ class File_List(object):              try:                  key, n, pyfile, pypack, pid = packager._getFileFromID(fileid)                  pyfile.plugin.req.abort = True +                packager.file_list.core.pullManager.addEvent(UpdateEvent("file", fileid, key))              finally:                  packager.file_list.lock.release() -       #oooops, duplicate?          def removeFileFromPackage(packager, id, pid):              key, n, pypack = packager._getPackageFromID(pid)              for k, pyfile in enumerate(pypack.files):                  if id == pyfile.id:                      del pypack.files[k] +                    packager.file_list.core.pullManager.addEvent(RemoveEvent("file", pyfile.id, key))                      if not pypack.files:                          packager.removePackage(pid)                      return True diff --git a/module/gui/Collector.py b/module/gui/Collector.py index 0aad5d1ba..ebdbd372d 100644 --- a/module/gui/Collector.py +++ b/module/gui/Collector.py @@ -27,7 +27,6 @@ class PackageCollector(QObject):          self.view = view          self.connector = connector          self.collector = [] -        self.interval = 2          self.rootItem = self.view.invisibleRootItem()          self.mutex = QMutex()          item = self.PackageCollectorPack(self) @@ -36,48 +35,82 @@ class PackageCollector(QObject):          item.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable)          self.rootItem.addChild(item)          self.linkCollector = item -        self.pauseIDs = [] -        self.updater = self.CollectorUpdater(self.interval) -        self.connect(self.updater, SIGNAL("update()"), self.update) -    class CollectorUpdater(QThread): -        def __init__(self, interval): -            QThread.__init__(self) -            self.interval = interval -            self.running = True -         -        def run(self): -            while self.running: -                self.emit(SIGNAL("update()")) -                self.sleep(self.interval) -     -    def start(self): -        self.updater.start() -     -    def wait(self): -        self.updater.wait() -     -    def stop(self): -        self.updater.running = False -     -    def update(self): +    def fullReload(self):          locker = QMutexLocker(self.mutex) +        self.clearAll()          packs = self.connector.getPackageCollector() -        ids = []          for data in packs: -            ids.append(data["id"]) -        self.clear(ids) -        for data in packs: -            if data["id"] in self.pauseIDs: -                continue -            ids.append(data["id"]) -            pack = self.getPack(data["id"]) -            if not pack: -                pack = self.PackageCollectorPack(self) +            pack = self.PackageCollectorPack(self)              pack.setPackData(data) +            files = self.connector.getPackageFiles(data["id"]) +            for fid in files: +                info = self.connector.getLinkInfo(fid) +                child = self.PackageCollectorFile(self, pack) +                child.setFileData(info) +                pack.addPackChild(fid, child)              self.addPack(data["id"], pack) +     +    def addEvent(self, event): +        if event[0] == "reload": +            self.fullReload() +        elif event[0] == "remove": +            self.removeEvent(event) +        elif event[0] == "insert": +            self.insertEvent(event) +        elif event[0] == "update": +            self.updateEvent(event) +     +    def removeEvent(self, event): +        if event[2] == "file": +            for pack in ItemIterator(self.rootItem): +                for k, child in enumerate(pack.getChildren()): +                    if child.getFileData()["id"] == event[3]: +                        pack.removeChild(child) +                        break +        else: +            for k, pack in enumerate(ItemIterator(self.rootItem)): +                if pack.getPackData()["id"] == event[3]: +                    self.rootItem.removeChild(pack) +                    break +     +    def insertEvent(self, event): +        if event[2] == "file": +            info = self.connector.getLinkInfo(event[3]) +            for pack in ItemIterator(self.rootItem): +                if pack.getPackData()["id"] == info["package"]: +                    child = self.PackageCollectorFile(self, pack) +                    child.setFileData(info) +                    pack.addPackChild(info["id"], child) +                    break +        else: +            data = self.connector.getPackageInfo(event[3]) +            pack = self.PackageCollectorPack(self) +            pack.setPackData(data) +            self.addPack(data["id"], pack) +            files = self.connector.getPackageFiles(data["id"]) +            for fid in files: +                info = self.connector.getLinkInfo(fid) +                child = self.PackageCollectorFile(self, pack) +                child.setFileData(info) +                pack.addPackChild(fid, child) +            self.addPack(data["id"], pack) +     +    def updateEvent(self, event): +        if event[2] == "file": +            info = self.connector.getLinkInfo(event[3]) +            if not info: +                return +            for pack in ItemIterator(self.rootItem): +                if pack.getPackData()["id"] == info["package"]: +                    child = pack.getChild(event[3]) +                    child.setFileData(info) +                    pack.addPackChild(info["id"], child) +        else: +            data = self.connector.getPackageInfo(event[3]) +            pack = self.getPack(event[3]) +            pack.setPackData(data)              files = self.connector.getPackageFiles(data["id"]) -            pack.clear(files)              for fid in files:                  info = self.connector.getLinkInfo(fid)                  child = pack.getChild(fid) @@ -85,6 +118,7 @@ class PackageCollector(QObject):                      child = self.PackageCollectorFile(self, pack)                  child.setFileData(info)                  pack.addPackChild(fid, child) +            self.addPack(data["id"], pack)      def addPack(self, pid, newPack):          pos = None @@ -110,38 +144,10 @@ class PackageCollector(QObject):                  return pack          return None -    def clear(self, ids): -        clear = False -        remove = [] +    def clearAll(self):          for k, pack in enumerate(ItemIterator(self.rootItem)): -            if not pack.getPackData()["id"] in ids and not pack.getPackData()["id"] == "fixed": -                clear = True -                remove.append(k) -        if not clear: -            return -        remove.sort() -        remove.reverse() -        for k in remove: -            self.rootItem.takeChild(k) -        for pack in ItemIterator(self.rootItem): -            if pack.getPackData()["id"] == "fixed": -                return -        item = self.PackageCollectorPack(self) -        item.setPackData({"id":"fixed"}) -        item.setData(0, Qt.DisplayRole, QVariant("Single Links")) -        item.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable) -        self.rootItem.addChild(item) -        self.linkCollector = item -     -    def pauseItemUpdate(self, pid, pause=True): -        locker = QMutexLocker(self.mutex) -        if pause and not pid in self.pauseIDs: -            self.pauseIDs.append(int(pid)) -        else: -            try: -                self.pauseIDs.remove(int(pid)) -            except: -                pass +            if not pack.getPackData()["id"] == "fixed": +                self.rootItem.removeChild(pack)      class PackageCollectorPack(QTreeWidgetItem):          def __init__(self, collector): @@ -184,25 +190,6 @@ class PackageCollector(QObject):                  if item.getFileData()["id"] == cid:                      return item              return None -     -        def clear(self, ids): -            clear = False -            remove = [] -            children = [] -            for k, file in enumerate(self.getChildren()): -                if not file.getFileData()["id"] in ids: -                    remove.append(file.getFileData()["id"]) -                if file.getFileData()["id"] in children and not file.getFileData()["id"] in remove: -                    remove.append(file.getFileData()["id"]) -                    continue -                children.append(file.getFileData()["id"]) -            if not remove: -                return -            remove.sort() -            remove.reverse() -            parent = self -            for k in remove: -                parent.takeChild(k)      class PackageCollectorFile(QTreeWidgetItem):          def __init__(self, collector, pack): @@ -226,44 +213,52 @@ class LinkCollector(QObject):          QObject.__init__(self)          self.view = view          self.connector = connector -        self.interval = 2          self.rootItem = root          self.mutex = QMutex() -        self.updater = self.CollectorUpdater(self.interval) -        self.connect(self.updater, SIGNAL("update()"), self.update) -    class CollectorUpdater(QThread): -        def __init__(self, interval): -            QThread.__init__(self) -            self.interval = interval -            self.running = True -         -        def run(self): -            while self.running: -                self.emit(SIGNAL("update()")) -                self.sleep(self.interval) -     -    def start(self): -        self.updater.start() -     -    def wait(self): -        self.updater.wait() -     -    def stop(self): -        self.updater.running = False -     -    def update(self): +    def fullReload(self):          locker = QMutexLocker(self.mutex) +        self.clearAll()          ids = self.connector.getLinkCollector() -        self.clear(ids)          for fid in ids:              data = self.connector.getLinkInfo(fid) -            file = self.getFile(fid) -            if not file: -                file = self.LinkCollectorFile(self) +            file = self.LinkCollectorFile(self)              file.setFileData(data)              self.addFile(fid, file) +    def addEvent(self, event): +        if event[0] == "reload": +            self.fullReload() +        elif event[0] == "remove": +            self.removeEvent(event) +        elif event[0] == "insert": +            self.insertEvent(event) +        elif event[0] == "update": +            self.updateEvent(event) +     +    def removeEvent(self, event): +        if event[2] == "file": +            for k, file in enumerate(ItemIterator(self.rootItem)): +                if file.getFileData()["id"] == event[3]: +                    self.rootItem.removeChild(file) +                    break +     +    def insertEvent(self, event): +        if event[2] == "file": +            data = self.connector.getLinkInfo(event[3]) +            file = self.LinkCollectorFile(self) +            file.setFileData(data) +            self.addFile(event[3], file) +     +    def updateEvent(self, event): +        if event[2] == "file": +            data = self.connector.getLinkInfo(event[3]) +            if not data: +                return +            file = getFile(event[3]) +            file.setFileData(data) +            self.addFile(event[3], file) +          def addFile(self, pid, newFile):          pos = None          try: @@ -289,16 +284,10 @@ class LinkCollector(QObject):                  return file          return None -    def clear(self, ids): -        clear = False -        for file in ItemIterator(self.rootItem): -            if not file.getFileData()["id"] in ids: -                clear = True -                break -        if not clear: -            return -        self.rootItem.takeChildren() - +    def clearAll(self): +        for k, file in enumerate(ItemIterator(self.rootItem)): +            self.rootItem.removeChild(file) +          class LinkCollectorFile(QTreeWidgetItem):          def __init__(self, collector):              QTreeWidgetItem.__init__(self) diff --git a/module/gui/Queue.py b/module/gui/Queue.py index 8681d3bb1..bd45e27dc 100644 --- a/module/gui/Queue.py +++ b/module/gui/Queue.py @@ -77,28 +77,103 @@ class Queue(QObject):              del d["name"]              del d["status"]              downloading[did] = d -        ids = [] -        for data in packs: -            ids.append(data["id"]) -        self.clear(ids) +        for pack in ItemIterator(self.rootItem): +            for child in pack.getChildren(): +                info = child.getFileData() +                try: +                    info["downloading"] = downloading[info["id"]] +                except: +                    info["downloading"] = None +                child.setFileData(info) +                pack.addPackChild(info["id"], child) +            self.addPack(pack.getPackData()["id"], pack) +     +    def fullReload(self): +        self.clearAll() +        packs = self.connector.getPackageQueue()          for data in packs: -            pack = self.getPack(data["id"]) -            if not pack: -                pack = self.QueuePack(self) +            pack = self.QueuePack(self)              pack.setPackData(data)              files = self.connector.getPackageFiles(data["id"]) -            pack.clear(files) +            for fid in files: +                info = self.connector.getLinkInfo(fid) +                child = self.QueueFile(self, pack) +                if not info["status_type"]: +                    info["status_type"] = "queued" +                child.setFileData(info) +                pack.addPackChild(fid, child)              self.addPack(data["id"], pack) +     +    def addEvent(self, event): +        locker = QMutexLocker(self.mutex) +        if event[0] == "reload": +            self.fullReload() +        elif event[0] == "remove": +            self.removeEvent(event) +        elif event[0] == "insert": +            self.insertEvent(event) +        elif event[0] == "update": +            self.updateEvent(event) +     +    def removeEvent(self, event): +        if event[2] == "file": +            for pack in ItemIterator(self.rootItem): +                for k, child in enumerate(pack.getChildren()): +                    if child.getFileData()["id"] == event[3]: +                        pack.removeChild(child) +                        break +        else: +            for k, pack in enumerate(ItemIterator(self.rootItem)): +                if pack.getPackData()["id"] == event[3]: +                    self.rootItem.removeChild(pack) +                    break +     +    def insertEvent(self, event): +        if event[2] == "file": +            info = self.connector.getLinkInfo(event[3]) +            for pack in ItemIterator(self.rootItem): +                if pack.getPackData()["id"] == info["package"]: +                    child = self.QueueFile(self, pack) +                    child.setFileData(info) +                    pack.addPackChild(info["id"], child) +                    break +        else: +            data = self.connector.getPackageInfo(event[3]) +            pack = self.QueuePack(self) +            pack.setPackData(data) +            self.addPack(data["id"], pack) +            files = self.connector.getPackageFiles(data["id"]) +            for fid in files: +                info = self.connector.getLinkInfo(fid) +                child = self.QueueFile(self, pack) +                if not info["status_type"]: +                    info["status_type"] = "queued" +                child.setFileData(info) +                pack.addPackChild(fid, child) +            self.addPack(data["id"], pack) +     +    def updateEvent(self, event): +        if event[2] == "file": +            info = self.connector.getLinkInfo(event[3]) +            if not info: +                return +            for pack in ItemIterator(self.rootItem): +                if pack.getPackData()["id"] == info["package"]: +                    child = pack.getChild(event[3]) +                    if not info["status_type"]: +                        info["status_type"] = "queued" +                    child.setFileData(info) +                    pack.addPackChild(info["id"], child) +        else: +            data = self.connector.getPackageInfo(event[3]) +            pack = self.getPack(event[3]) +            pack.setPackData(data) +            files = self.connector.getPackageFiles(data["id"])              for fid in files:                  info = self.connector.getLinkInfo(fid)                  child = pack.getChild(fid)                  if not child:                      child = self.QueueFile(self, pack) -                info["downloading"] = None -                try: -                    info["downloading"] = downloading[info["id"]] -                except: -                    pass                  if not info["status_type"]:                      info["status_type"] = "queued"                  child.setFileData(info) @@ -145,19 +220,9 @@ class Queue(QObject):                  return pack          return None -    def clear(self, ids): -        clear = False -        remove = [] -        for k, pack in enumerate(ItemIterator(self.rootItem)): -            if not pack.getPackData()["id"] in ids: -                clear = True -                remove.append(k) -        if not clear: -            return -        remove.sort() -        remove.reverse() -        for k in remove: -            self.rootItem.takeChild(k) +    def clearAll(self): +        for pack in ItemIterator(self.rootItem): +            self.rootItem.removeChild(pack)      def getWaitingProgress(self, q):          locker = QMutexLocker(self.mutex) @@ -282,24 +347,6 @@ class Queue(QObject):                  if item.getFileData()["id"] == cid:                      return item              return None -     -        def clear(self, ids): -            clear = False -            remove = [] -            children = [] -            for k, file in enumerate(self.getChildren()): -                if not file.getFileData()["id"] in ids: -                    remove.append(file.getFileData()["id"]) -                if file.getFileData()["id"] in children and not file.getFileData()["id"] in remove: -                    remove.append(file.getFileData()["id"]) -                    continue -                children.append(file.getFileData()["id"]) -            if not remove: -                return -            remove.sort() -            remove.reverse() -            for k in remove: -                self.takeChild(k)      class QueueFile(QTreeWidgetItem):          def __init__(self, queue, pack): diff --git a/module/gui/connector.py b/module/gui/connector.py index 432999161..b6c383956 100644 --- a/module/gui/connector.py +++ b/module/gui/connector.py @@ -19,6 +19,7 @@  SERVER_VERSION = "0.3"  from time import sleep +from uuid import uuid4 as uuid  from PyQt4.QtCore import *  from PyQt4.QtGui import * @@ -35,6 +36,7 @@ class connector(QThread):          self.running = True          self.proxy = None          self.addr = None +        self.connectionID = None          self.errorQueue = []          self.connect(self, SIGNAL("proxy_error"), self._proxyError) @@ -72,6 +74,7 @@ class connector(QThread):          self.proxy = ServerProxy(addr, allow_none=True)          try:              server_version = self.proxy.get_server_version() +            self.connectionID = uuid().hex          except:              return False          if not server_version == SERVER_VERSION: @@ -124,9 +127,12 @@ class connector(QThread):          """          self.mutex.lock()          try: -            return self.proxy.get_file_info(id) +            info = self.proxy.get_file_info(id) +            info["downloading"] = None +            return info          except Exception, e: -            self.emit(SIGNAL("proxy_error"), "getLinkInfo", e) +            #self.emit(SIGNAL("proxy_error"), "getLinkInfo", e) +            return None          finally:              self.mutex.unlock() @@ -421,4 +427,16 @@ class connector(QThread):              self.emit(SIGNAL("proxy_error"), "setCaptchaResult", e)          finally:              self.mutex.unlock() +     +    def getEvents(self): +        """ +            get events +        """ +        self.mutex.lock() +        try: +            return self.proxy.get_events(self.connectionID) +        except Exception, e: +            self.emit(SIGNAL("proxy_error"), "getEvents", e) +        finally: +            self.mutex.unlock() diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py index 88b567904..12728d022 100644 --- a/module/plugins/container/CCF.py +++ b/module/plugins/container/CCF.py @@ -2,7 +2,6 @@  # -*- coding: utf-8 -*-  import os.path -import random  import re  import tempfile  import urllib2 @@ -36,20 +35,11 @@ class CCF(Plugin):              "upload": open(infile, "rb")}          tempdlc_content = opener.open('http://service.jdownloader.net/dlcrypt/getDLC.php', params).read() -        random.seed() -        tempdir = tempfile.gettempdir() -        if tempdir[0] == '/': -            delim = '/' -        else: -            delim = '\\' -        tempdlc_name = tempdir + delim + str(random.randint(0, 100)) + '-tmp.dlc' -        while os.path.exists(tempdlc_name): -            tempdlc_name = tempfile.gettempdir() + '/' + str(random.randint(0, 100)) + '-tmp.dlc' - -        tempdlc = open(tempdlc_name, "w") +        tempdlc = tempfile.NamedTemporaryFile(delete=False, suffix='.dlc')          tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.DOTALL).group(1)) -        tempdlc.close +        tempdlc.close() -        self.links.append(tempdlc_name) +        self.links.append(tempdlc.name)          return True + diff --git a/module/plugins/decrypter/SerienjunkiesOrg.py b/module/plugins/decrypter/SerienjunkiesOrg.py index af7dc8169..d8396bd0b 100644 --- a/module/plugins/decrypter/SerienjunkiesOrg.py +++ b/module/plugins/decrypter/SerienjunkiesOrg.py @@ -5,6 +5,7 @@ import re  from module.Plugin import Plugin  from module.BeautifulSoup import BeautifulSoup  from module.unescape import unescape +from module.download_thread import CaptchaError  class SerienjunkiesOrg(Plugin):      def __init__(self, parent): diff --git a/module/thread_list.py b/module/thread_list.py index 1a66bf6f5..a50d73aaf 100644 --- a/module/thread_list.py +++ b/module/thread_list.py @@ -1,22 +1,27 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# -#Copyright (C) 2009 sp00b, sebnapi, RaNaN -# -#This program is free software; you can redistribute it and/or modify -#it under the terms of the GNU General Public License as published by -#the Free Software Foundation; either version 3 of the License, -#or (at your option) any later version. -# -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -#See the GNU General Public License for more details. -# -#You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# -### + +""" +    This program is free software; you can redistribute it and/or modify +    it under the terms of the GNU General Public License as published by +    the Free Software Foundation; either version 3 of the License, +    or (at your option) any later version. + +    This program is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +    See the GNU General Public License for more details. + +    You should have received a copy of the GNU General Public License +    along with this program; if not, see <http://www.gnu.org/licenses/>. +     +    @author: mkaay +    @author: spoob +    @author: sebnapi +    @author: RaNaN +    @version: v0.3 +""" +  from __future__ import with_statement  from os.path import exists  import re @@ -80,9 +85,9 @@ class Thread_List(object):                  self.occ_plugins.append(pyfile.modul.__name__)              pyfile.active = True              if pyfile.plugin.props['type'] == "container": -                self.parent.logger.info('Get links from: ' + pyfile.url) +                self.parent.logger.info(_("Get links from: %s") % pyfile.url)              else: -                self.parent.logger.info('Download starts: ' + pyfile.url) +                self.parent.logger.info(_("Download starts: %s") % pyfile.url)          self.lock.release()          return pyfile @@ -128,27 +133,27 @@ class Thread_List(object):                  self.list.packager.removeFileFromPackage(pyfile.id, pyfile.package.data["id"])                  if newLinks: -                    self.parent.logger.info("Parsed links from %s: %i" % (pyfile.status.filename, newLinks)) +                    self.parent.logger.info(_("Parsed links from %s: %i") % (pyfile.status.filename, newLinks))                  else: -                    self.parent.logger.info("No links in %s" % pyfile.status.filename) +                    self.parent.logger.info(_("No links in %s") % pyfile.status.filename)                  #~ self.list.packager.removeFileFromPackage(pyfile.id, pyfile.package.id)                  #~ for link in pyfile.plugin.links:                  #~ id = self.list.collector.addLink(link)                  #~ pyfile.packager.pullOutPackage(pyfile.package.id)                  #~ pyfile.packager.addFileToPackage(pyfile.package.id, pyfile.collector.popFile(id))              else: -                self.parent.logger.info("Download finished: %s" % pyfile.url) +                self.parent.logger.info(_("Download finished: %s") % pyfile.url)          elif pyfile.status.type == "reconnected":              pyfile.plugin.req.init_curl()          elif pyfile.status.type == "failed": -            self.parent.logger.warning("Download failed: " + pyfile.url + " | " + pyfile.status.error) +            self.parent.logger.warning(_("Download failed: %s | %s") % (pyfile.url, pyfile.status.error))              with open(self.parent.config['general']['failed_file'], 'a') as f:                  f.write(pyfile.url + "\n")          elif pyfile.status.type == "aborted": -            self.parent.logger.info("Download aborted: " + pyfile.url) +            self.parent.logger.info(_("Download aborted: %s") % pyfile.url)          self.list.save() @@ -198,7 +203,7 @@ class Thread_List(object):              return False      def reconnect(self): -        self.parent.logger.info("Start reconnect") +        self.parent.logger.info(_("Starting reconnect"))          ip = re.match(".*Current IP Address: (.*)</body>.*", urllib2.urlopen("http://checkip.dyndns.org/").read()).group(1)          self.parent.hookManager.beforeReconnecting(ip)          reconn = subprocess.Popen(self.parent.config['reconnect']['method'])#, stdout=subprocess.PIPE) @@ -212,7 +217,7 @@ class Thread_List(object):                  ip = ""              time.sleep(1)          self.parent.hookManager.afterReconnecting(ip) -        self.parent.logger.info("Reconnected, new IP: " + ip) +        self.parent.logger.info(_("Reconnected, new IP: %s") % ip)      def stopAllDownloads(self):          self.pause = True diff --git a/pyLoadCore.py b/pyLoadCore.py index 0682cc873..1047273d6 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -59,6 +59,7 @@ from module.network.Request import Request  import module.remote.SecureXMLRPCServer as Server
  from module.thread_list import Thread_List
  from module.web.ServerThread import WebServer
 +from module.PullEvents import PullManager
  class Core(object):
      """ pyLoad Core """
 @@ -107,12 +108,12 @@ class Core(object):          translation = gettext.translation("pyLoad", join(self.path, "locale"), languages=[self.config['general']['language']])
          translation.install(unicode=True)
 -        self.check_install("Crypto", "pycrypto to decode container files")
 -        self.check_install("Image", "Python Image Libary (PIL) for captha reading")
 -        self.check_install("pycurl", "pycurl for lower memory footprint while downloading")
 -        self.check_install("django", "Django for webinterface")
 -        self.check_install("tesseract", "tesseract for captcha reading", False)
 -        self.check_install("gocr", "gocr for captcha reading", False)
 +        self.check_install("Crypto", _("pycrypto to decode container files"))
 +        self.check_install("Image", _("Python Image Libary (PIL) for captha reading"))
 +        self.check_install("pycurl", _("pycurl for lower memory footprint while downloading"))
 +        self.check_install("django", _("Django for webinterface"))
 +        self.check_install("tesseract", _("tesseract for captcha reading"), False)
 +        self.check_install("gocr", _("gocr for captcha reading"), False)
          self.check_file(self.config['log']['log_folder'], _("folder for logs"), True)
          self.check_file(self.config['general']['download_folder'], _("folder for downloads"), True)
 @@ -120,7 +121,7 @@ class Core(object):          self.check_file(self.config['general']['failed_file'], _("file for failed links"))
          if self.config['ssl']['activated']:
 -            self.check_install("OpenSSL", "OpenSSL for secure connection", True)
 +            self.check_install("OpenSSL", _("OpenSSL for secure connection"), True)
              self.check_file(self.config['ssl']['cert'], _("ssl certificate"), False, True)
              self.check_file(self.config['ssl']['key'], _("ssl key"), False, True)
 @@ -138,7 +139,8 @@ class Core(object):          self.lastGuiConnected = 0
          self.server_methods = ServerMethods(self)
 -        self.file_list = File_List(self)
 +        self.file_list = File_List(self) +        self.pullManager = PullManager(self)
          self.thread_list = Thread_List(self)
          self.captchaManager = CaptchaManager(self)
 @@ -174,11 +176,11 @@ class Core(object):          while True:
              sleep(2)
              if self.do_restart:
 -                self.logger.info("restarting pyLoad")
 +                self.logger.info(_("restarting pyLoad"))
                  self.restart()
              if self.do_kill:
                  self.shutdown()
 -                self.logger.info("pyLoad quits")
 +                self.logger.info(_("pyLoad quits"))
                  exit()
              if self.last_update_check + self.update_check_interval <= time.time():
                  self.update_available = self.check_update()
 @@ -189,16 +191,16 @@ class Core(object):              usermap = {self.config['remote']['username']: self.config['remote']['password']}
              if self.config['ssl']['activated']:
                  self.server = Server.SecureXMLRPCServer(server_addr, self.config['ssl']['cert'], self.config['ssl']['key'], usermap)
 -                self.logger.info("Secure XMLRPC Server Started")
 +                self.logger.info(_("Secure XMLRPC Server Started"))
              else:
                  self.server = Server.AuthXMLRPCServer(server_addr, usermap)
 -                self.logger.info("Auth XMLRPC Server Started")
 +                self.logger.info(_("Auth XMLRPC Server Started"))
              self.server.register_instance(self.server_methods)
              thread.start_new_thread(self.server.serve_forever, ())
          except Exception, e:
 -            self.logger.error("Failed starting socket server, CLI and GUI will not be available: %s" % str(e))
 +            self.logger.error(_("Failed starting XMLRPC server CLI and GUI will not be available: %s") % str(e))
              if self.config['general']['debug_mode']:
                  import traceback
                  traceback.print_exc()
 @@ -300,7 +302,7 @@ class Core(object):                          break
              if plugin_pattern != "":
                  self.plugins_avaible[plugin_file] = plugin_pattern
 -                self.logger.debug(plugin_file + _(" added"))
 +                self.logger.debug(_("%s added") % plugin_file)
          self.logger.info(_("created index of plugins"))
      def compare_time(self, start, end):
 @@ -320,7 +322,7 @@ class Core(object):          return self.downloadSpeedLimit
      def shutdown(self):
 -        self.logger.info("shutting down...")
 +        self.logger.info(_("shutting down..."))
          if self.config['webinterface']['activated']:
              self.webserver.quit()
              self.webserver.join()
 @@ -336,10 +338,10 @@ class Core(object):              if self.config['updates']['search_updates']:
                  version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION, ))
                  if version_check == "":
 -                    self.logger.info("No Updates for pyLoad")
 +                    self.logger.info(_("No Updates for pyLoad"))
                      return False
                  else:
 -                    self.logger.info("New pyLoad Version %s available" % version_check)
 +                    self.logger.info(_("New pyLoad Version %s available") % version_check)
                      return True
              else:
                  return False
 @@ -364,7 +366,7 @@ class Core(object):                          __import__("module.Unzip", globals(), locals(), "Unzip", -1).Unzip().extract(tmp_zip_name, "Test/")
                          return True
                      except:
 -                        self.logger.info("Auto install Failed")
 +                        self.logger.info(_("Auto install Failed"))
                          return False
                  else:
                      return False
 @@ -571,7 +573,10 @@ class ServerMethods():              return True
          else:
              return False
 -
 +     +    def get_events(self, uuid): +        return self.core.pullManager.getEvents(uuid) +    
      #def move_urls_up(self, ids):
      #    for id in ids:
      #        self.core.file_list.move(id)
 @@ -599,5 +604,5 @@ if __name__ == "__main__":          pyload_core.start()
      except KeyboardInterrupt:
          pyload_core.shutdown()
 -        pyload_core.logger.info("killed pyLoad from Terminal")
 +        pyload_core.logger.info(_("killed pyLoad from Terminal"))
          exit()
 diff --git a/pyLoadGui.py b/pyLoadGui.py index 9e04cc003..c3deb9a6e 100755 --- a/pyLoadGui.py +++ b/pyLoadGui.py @@ -87,7 +87,6 @@ class main(QObject):          self.mainloop.start()          self.clipboard = self.app.clipboard()          self.connect(self.clipboard, SIGNAL('dataChanged()'), self.slotClipboardChange) -        self.connect(self.mainWindow, SIGNAL("pauseItemUpdate"), self.packageCollector.pauseItemUpdate)          self.mainWindow.actions["clipboard"].setChecked(self.checkClipboard)      def stopMain(self): @@ -106,8 +105,6 @@ class main(QObject):          self.mainloop.wait()          self.connector.wait()          self.queue.wait() -        self.linkCollector.wait() -        self.packageCollector.wait()      def connectSignals(self):          """ @@ -216,7 +213,6 @@ class main(QObject):          view.setDragDropOverwriteMode(True)          self.connect(view, SIGNAL("droppedToPack"), self.slotAddFileToPackage)          self.packageCollector = PackageCollector(view, self.connector) -        self.packageCollector.start()      def initLinkCollector(self):          """ @@ -224,7 +220,6 @@ class main(QObject):              * refresh thread          """          self.linkCollector = LinkCollector(self.mainWindow.tabs["collector"]["package_view"], self.packageCollector.linkCollector, self.connector) -        self.linkCollector.start()      def initQueue(self):          """ @@ -579,6 +574,16 @@ class main(QObject):      def slotCaptchaDone(self, cid, result):          self.connector.setCaptchaResult(str(cid), str(result)) +    def pullEvents(self): +        events = self.connector.getEvents() +        for event in events: +            if event[1] == "queue": +                self.queue.addEvent(event) +            elif event[1] == "packages": +                self.packageCollector.addEvent(event) +            elif event[1] == "collector": +                self.linkCollector.addEvent(event) +          class Loop(QThread):          """              main loop (not application loop) @@ -602,6 +607,7 @@ class main(QObject):              self.parent.refreshLog()              self.parent.updateAvailable()              self.parent.checkCaptcha() +            self.parent.pullEvents()          def stop(self):              self.running = False diff --git a/systemCheck.py b/systemCheck.py new file mode 100644 index 000000000..7227bc674 --- /dev/null +++ b/systemCheck.py @@ -0,0 +1,158 @@ +import os +from os.path import dirname +from os.path import exists +from os.path import join +import subprocess +import sys + +def main(): +    print "#####   System Information   #####" +    print "" +    print "Platform:", sys.platform +    print "Operating System:", os.name +    print "Python:", sys.version.replace("\n", "") +    print os.uname() +    print "" + +    try: +        import pycurl +        print "pycurl:", pycurl.version +    except: +        print "pycurl:", "missing" + +    try: +        import Crypto +        print "py-crypto:", Crypto.__version__ +    except: +        print "py-crypto:", "missing" + + +    try: +        import OpenSSL +        print "OpenSSL:", OpenSSL.version.__version__ +    except: +        print "OpenSSL:", "missing" + +    try: +        import Image +        print "image libary:", Image.VERSION +    except: +        print "image libary:", "missing" + +    try: +        import django +        print "django:", django.get_version() +    except: +        print "django:", "missing" + +    try: +        import PyQt4 +        print "pyqt:", "4" +    except: +        print "pyqt:", "missing" + +    print "" +    print "" +    print "#####   System Status   #####" +    print "" +    print "##  pyLoadCore  ##" + +    core_err = [] + +    if sys.version_info > (2, 7): +        core_err.append("Your python version is to new, Please use Python 2.6") + +    if sys.version_info < (2, 5): +        core_err.append("Your python version is to old, Please use at least Python 2.5") + +    try: +        import pycurl +    except: +        core_err.append("Please install py-curl to use pyLoad.") + +    try: +        import Image +    except: +        core_err.append("Please install py-imaging/pil to use Hoster, which uses captchas.") + + +    pipe = subprocess.PIPE +    try: +        p = subprocess.call(["tesseract"], stdout=pipe, stderr=pipe) +    except: +        core_err.append("Please install tesseract to use Hoster, which uses captchas.") + +    try: +        p = subprocess.call(["gocr"], stdout=pipe, stderr=pipe) +    except: +        core_err.append("Install gocr to use some Hoster, which uses captchas.") + +    try: +        import OpenSSL +    except: +        core_err.append("Install OpenSSL if you want to create a secure connection to the core.") + + + +    if core_err: +        print "The system check has detected some errors:" +        print "" +        for err in core_err: +            print err +    else: +        print "No Problems detected, pyLoadCore should work fine." + + +    print "" +    print "##  pyLoadGui  ##" + +    gui_err = [] + +    try: +        import PyQt4 +    except: +        gui_err.append("GUI won't work without pyqt4 !!") + + +    if gui_err: +        print "The system check has detected some errors:" +        print "" +        for err in gui_err: +            print err +    else: +        print "No Problems detected, pyLoadGui should work fine." + +    print "" +    print "##  Webinterface  ##" + +    web_err = [] + +    try: +        import django + +        if django.VERSION < (1, 1): +            web_err.append("Your django version is to old, please upgrade to django 1.1") +        elif django.VERSION > (1, 2): +            web_err.append("Your django version is to new, please use django 1.1") + +    except: +        web_err.append("Webinterface won't work without django !!") + + + +    if not exists(join(dirname(__file__), "module", "web", "pyload.db")): +        web_err.append("You dont have created database yet.") +        web_err.append("Please run: python %s syncdb" % join(dirname(__file__), "module", "web", "manage.py")) + + + +    if web_err: +        print "The system check has detected some errors:" +        print "" +        for err in web_err: +            print err +    else: +        print "No Problems detected, Webinterface should work fine." + +if __name__ == "__main__": +    main()
\ No newline at end of file | 
