diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-04 14:40:38 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-04 14:40:38 +0200 |
commit | c923c14901a2e9215c42f072607a1cc3ffe675ab (patch) | |
tree | 3dc3ae59a2f5a9dc479af7621ead7cda2f9e3fb5 | |
parent | more fixing (diff) | |
download | pyload-c923c14901a2e9215c42f072607a1cc3ffe675ab.tar.xz |
some fixes
-rw-r--r-- | module/FileDatabase.py | 12 | ||||
-rw-r--r-- | module/plugins/Container.py | 7 | ||||
-rw-r--r-- | module/plugins/container/CCF.py | 1 | ||||
-rw-r--r-- | module/plugins/container/LinkList.py | 4 | ||||
-rw-r--r-- | module/plugins/container/RSDF.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/NetloadIn.py | 1 | ||||
-rw-r--r-- | module/web/ajax/views.py | 2 | ||||
-rw-r--r-- | module/web/pyload/views.py | 4 | ||||
-rw-r--r-- | module/web/templates/default/settings.html | 4 |
9 files changed, 14 insertions, 22 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py index 8daacf050..b24467612 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -129,15 +129,13 @@ class FileHandler: if self.packageCache.has_key(id): del self.packageCache[id] - toDelete = [] - - for pyfile in self.cache.itervalues(): + pyfiles = self.cache.values() + + for pyfile in pyfiles: if pyfile.packageid == id: pyfile.abortDownload() - toDelete.append(pyfile.id) + pyfile.release() - for pid in toDelete: - del self.cache[pid] self.db.deletePackage(id) @@ -155,7 +153,6 @@ class FileHandler: if id in self.core.threadManager.processingIds(): self.cache[id].abortDownload() - #del self.cache[id] self.lock.release() @@ -626,7 +623,6 @@ class PyFile(): def abortDownload(self): """abort pyfile if possible""" - self.m.core.log.info(_("Download aborted: %s" % self.name)) while self.id in self.m.core.threadManager.processingIds(): self.abort = True if self.plugin: self.plugin.req.abort = True diff --git a/module/plugins/Container.py b/module/plugins/Container.py index 9795ec98a..1539ea37e 100644 --- a/module/plugins/Container.py +++ b/module/plugins/Container.py @@ -17,11 +17,10 @@ @author: mkaay """ -### can be left blank and removed in future, no seperation of crypter and container needed atm. - from module.plugins.Crypter import Crypter from os.path import join, exists, basename +from os import remove class Container(Crypter): __name__ = "Container" @@ -38,6 +37,8 @@ class Container(Crypter): def preprocessing(self, thread): """prepare""" self.thread = thread + + self.loadToDisk() self.decrypt(self.pyfile) self.deleteTmp() @@ -71,6 +72,6 @@ class Container(Crypter): #---------------------------------------------------------------------- def deleteTmp(self): if self.pyfile.name.startswith("tmp_"): - os.remove(self.pyfile.url) + remove(self.pyfile.url) diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py index 6032cd052..a18a7c309 100644 --- a/module/plugins/container/CCF.py +++ b/module/plugins/container/CCF.py @@ -19,7 +19,6 @@ class CCF(Container): __author_mail__ = ("Willnix@pyload.org") def decrypt(self, pyfile): - self.loadToDisk() infile = pyfile.url.replace("\n", "") diff --git a/module/plugins/container/LinkList.py b/module/plugins/container/LinkList.py index 9668b34ad..c9e7a85a3 100644 --- a/module/plugins/container/LinkList.py +++ b/module/plugins/container/LinkList.py @@ -14,9 +14,7 @@ class LinkList(Container): def decrypt(self, pyfile): - - self.loadToDisk() - + txt = open(pyfile.url, 'r') links = txt.readlines() curPack = "Parsed links %s" % pyfile.name diff --git a/module/plugins/container/RSDF.py b/module/plugins/container/RSDF.py index ebd41d279..de2ff9048 100644 --- a/module/plugins/container/RSDF.py +++ b/module/plugins/container/RSDF.py @@ -16,7 +16,6 @@ class RSDF(Container): def decrypt(self, pyfile): - self.loadToDisk() from Crypto.Cipher import AES diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index a374a0c4d..9d3b0d387 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -92,6 +92,7 @@ class NetloadIn(Hoster): try: captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', self.html[1]).group(1) except: + open("dump.html", "w").write(self.html[1]) url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', self.html[1]).group(1).replace("amp;", "") self.html[1] = self.load(url_captcha_html, cookies=True) captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', self.html[1]).group(1) diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py index 02c135bfe..2c807f6c9 100644 --- a/module/web/ajax/views.py +++ b/module/web/ajax/views.py @@ -88,7 +88,6 @@ def remove_link(request, id): settings.PYLOAD.del_links([int(id)]) return JsonResponse("sucess") except Exception, e: - print_exc() return HttpResponseServerError() @permission('pyload.can_see_dl') @@ -124,7 +123,6 @@ def links(request): data['ids'] = ids return JsonResponse(data) except Exception, e: - print e return HttpResponseServerError() @permission('pyload.can_see_dl') diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index f6175f338..d75b7a485 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -215,7 +215,7 @@ def config(request): for key, option in section.iteritems(): if key == "desc": continue - if ";" in option["typ"]: - option["list"] = option["typ"].split(";") + if ";" in option["type"]: + option["list"] = option["type"].split(";") return render_to_response(join(settings.TEMPLATE, 'settings.html'), RequestContext(request, {'conf': conf, 'messages': []}, [status_proc])) diff --git a/module/web/templates/default/settings.html b/module/web/templates/default/settings.html index d9aef5303..48ae85170 100644 --- a/module/web/templates/default/settings.html +++ b/module/web/templates/default/settings.html @@ -44,13 +44,13 @@ <label for="{{skey}}|{{okey}}" style="color:#424242;"> {{option.desc}} - {% ifequal option.typ "bool" %} + {% ifequal option.type "bool" %} <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"> <option {% if option.value %} selected="selected" {% endif %}value="True">{% trans "on" %}</option> <option {% if not option.value %} selected="selected" {% endif %}value="False">{% trans "off" %}</option> </select> {% else %} - {% if option.typ|contains:";" %} + {% if option.type|contains:";" %} <select id="{{skey}}|{{okey}}" name="{{skey}}|{{okey}}"> {% for entry in option.list %} <option {% ifequal option.value entry %} selected="selected" {% endifequal %}>{{entry}}</option> |