diff options
-rw-r--r-- | Plugins/ZippyshareCom.py | 68 | ||||
-rw-r--r-- | Plugins/ZshareNet.py | 3 | ||||
-rw-r--r-- | locale/de/LC_MESSAGES/pyLoad.mo | bin | 1125 -> 1184 bytes | |||
-rw-r--r-- | locale/de/de.po | 74 | ||||
-rw-r--r-- | locale/en/LC_MESSAGES/pyLoad.mo | bin | 0 -> 370 bytes | |||
-rw-r--r-- | locale/en/en.po | 68 | ||||
-rw-r--r-- | module/thread_list.py | 7 |
7 files changed, 176 insertions, 44 deletions
diff --git a/Plugins/ZippyshareCom.py b/Plugins/ZippyshareCom.py new file mode 100644 index 000000000..b059c836c --- /dev/null +++ b/Plugins/ZippyshareCom.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python + +import re +import urllib +from time import time +from Plugin import Plugin + +class ZippyshareCom(Plugin): + + def __init__(self, parent): + Plugin.__init__(self, parent) + props = {} + props['name'] = "ZippyshareCom" + props['type'] = "hoster" + props['pattern'] = r"(http://)?www?\d{0,2}\.zippyshare.com/v/" + props['version'] = "0.1" + props['description'] = """Zippyshare.com Download Plugin""" + props['author_name'] = ("spoob") + props['author_mail'] = ("spoob@pyload.org") + self.plugin_config = props + self.parent = parent + self.html = None + self.want_reconnect = False + self.multi_dl = False + + def set_parent_status(self): + """ sets all available Statusinfos about a File in self.parent.status + """ + if self.html == None: + self.download_html() + self.parent.status.filename = self.get_file_name() + self.parent.status.url = self.get_file_url() + self.parent.status.wait = self.wait_until() + + def download_html(self): + url = self.parent.url + self.html = self.req.load(url) + self.time_plus_wait = time() + 10 + + def get_file_url(self): + """ returns the absolute downloadable filepath + """ + if self.html == None: + self.download_html() + if not self.want_reconnect: + file_url = urllib.unquote(re.search("var comeonguys = 'fck(.*)';", self.html).group(1)) + return file_url + else: + return False + + def get_file_name(self): + if self.html == None: + self.download_html() + if not self.want_reconnect: + file_name = re.search("<strong>Name: </strong>(.*)</font><br />", self.html).group(1) + print file_name + else: + return self.parent.url + + def file_exists(self): + """ returns True or False + """ + if self.html == None: + self.download_html() + if re.search(r"HTTP Status 404", self.html) != None: + return False + else: + return True diff --git a/Plugins/ZshareNet.py b/Plugins/ZshareNet.py index 7acc71608..58c32e0ed 100644 --- a/Plugins/ZshareNet.py +++ b/Plugins/ZshareNet.py @@ -21,7 +21,7 @@ class ZshareNet(Plugin): self.html_old = None #time() where loaded the HTML self.time_plus_wait = None #time() + wait in seconds self.posts = {} - self.want_reconnect = None + self.want_reconnect = False self.multi_dl = False def set_parent_status(self): @@ -60,7 +60,6 @@ class ZshareNet(Plugin): self.download_html() if not self.want_reconnect: file_name = re.search("<font color=\"#666666\">(.*)</font></td>", self.html[0]).group(1) - print file_name return file_name else: return self.parent.url diff --git a/locale/de/LC_MESSAGES/pyLoad.mo b/locale/de/LC_MESSAGES/pyLoad.mo Binary files differindex 97816423e..cdf55fcc2 100644 --- a/locale/de/LC_MESSAGES/pyLoad.mo +++ b/locale/de/LC_MESSAGES/pyLoad.mo diff --git a/locale/de/de.po b/locale/de/de.po index 9693e074b..b64d55ba1 100644 --- a/locale/de/de.po +++ b/locale/de/de.po @@ -4,63 +4,65 @@ # msgid "" msgstr "" -"Project-Id-Version: pyLoad 0.1\n" -"POT-Creation-Date: 2009-05-30 20:15+CEST\n" -"PO-Revision-Date: 2009-05-30 20:19+0100\n" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2009-06-04 15:33+CEST\n" +"PO-Revision-Date: 2009-06-04 22:50+0100\n" "Last-Translator: spoob <spoob@gmx.de>\n" -"Language-Team: pyLoad <LL@li.org>\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" "Generated-By: pygettext.py 1.5\n" -"X-Poedit-Language: German\n" -"X-Poedit-Country: Germany\n" #: Core.py:59 -msgid "Downloadtime:" -msgstr "Downloadzeit:" +msgid "folder for logs" +msgstr "Ordner für Logs" -#: Core.py:63 +#: Core.py:60 msgid "folder for downloads" -msgstr "Ordner für Downloads" - -#: Core.py:64 -msgid "folder for logs" -msgstr "Ordner für Logs" +msgstr "Ordner für Downloads" -#: Core.py:65 +#: Core.py:61 msgid "file for links" -msgstr "Datei für Links" +msgstr "Linkdatei" -#: Core.py:102 -msgid " added" -msgstr " hinzugefügt" +#: Core.py:68 +msgid "Downloadtime: %s" +msgstr "Downloadzeit: %s" -#: Core.py:103 +#: Core.py:96 +msgid "added" +msgstr "Hinzugefügt" + +#: Core.py:97 msgid "created index of plugins" -msgstr "Plugin Index erstellt" +msgstr "Plugin Index erstellt." -#: Core.py:149 -msgid "new update %s on pyload.de.rw" -msgstr "Neues Update %s auf pyload.tk" +#: Core.py:119 +msgid "new update %s on pyload.org" +msgstr "Neue Version - pyLoad %s - auf pyload.org verfügbar!" -#: Core.py:151 +#: Core.py:121 msgid "newst version %s in use:" -msgstr "Neuste Version %s in benutzung" +msgstr "Neueste Version - pyLoad %s - in Benutzung." -#: Core.py:153 +#: Core.py:123 msgid "beta version %s in use:" -msgstr "Beta Version %s in benutzung" +msgstr "Beta Version - pyLoad %s - in Benutzung." + +#: Core.py:132 +msgid "%s created" +msgstr "erstellt." -#: Core.py:162 -msgid "created" -msgstr "erstellt" +#: Core.py:134 +msgid "could not create %s" +msgstr "Konnte %s nicht erstellen." -#: Core.py:164 -msgid "could %s not create " -msgstr "Konnte %s nicht erstellen" +#: Core.py:194 +msgid "%i seconds" +msgstr "%i Sekunden." -#: Core.py:252 +#: Core.py:222 msgid "Server Mode" -msgstr "Server Modus" +msgstr "Servermodus" diff --git a/locale/en/LC_MESSAGES/pyLoad.mo b/locale/en/LC_MESSAGES/pyLoad.mo Binary files differnew file mode 100644 index 000000000..4875635e6 --- /dev/null +++ b/locale/en/LC_MESSAGES/pyLoad.mo diff --git a/locale/en/en.po b/locale/en/en.po new file mode 100644 index 000000000..97d8767f1 --- /dev/null +++ b/locale/en/en.po @@ -0,0 +1,68 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2009-06-04 15:33+CEST\n" +"PO-Revision-Date: 2009-06-04 15:34+0100\n" +"Last-Translator: spoob <spoob@gmx.de>\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" +"Generated-By: pygettext.py 1.5\n" + +#: Core.py:59 +msgid "folder for logs" +msgstr "" + +#: Core.py:60 +msgid "folder for downloads" +msgstr "" + +#: Core.py:61 +msgid "file for links" +msgstr "" + +#: Core.py:68 +msgid "Downloadtime: %s" +msgstr "" + +#: Core.py:96 +msgid " added" +msgstr "" + +#: Core.py:97 +msgid "created index of plugins" +msgstr "" + +#: Core.py:119 +msgid "new update %s on pyload.org" +msgstr "" + +#: Core.py:121 +msgid "newst version %s in use:" +msgstr "" + +#: Core.py:123 +msgid "beta version %s in use:" +msgstr "" + +#: Core.py:132 +msgid "%s created" +msgstr "" + +#: Core.py:134 +msgid "could not create %s" +msgstr "" + +#: Core.py:194 +msgid "%i seconds" +msgstr "" + +#: Core.py:222 +msgid "Server Mode" +msgstr "" + diff --git a/module/thread_list.py b/module/thread_list.py index 531bc7401..8ae78b089 100644 --- a/module/thread_list.py +++ b/module/thread_list.py @@ -125,7 +125,6 @@ class Thread_List(object): with open(self.parent.config['failed_file'], 'a') as f: f.write(pyfile.url+"\n") - self.lock.release() return True @@ -151,15 +150,12 @@ class Thread_List(object): if self.reconnecting: return False - + self.lock.acquire() if self.check_reconnect(): - self.reconnecting = True - self.reconnect() - time.sleep(1.1) self.reconnecting = False @@ -185,7 +181,6 @@ class Thread_List(object): else: return False - def reconnect(self): reconn = subprocess.Popen(self.parent.config['reconnectMethod']) reconn.wait() |