diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-07 13:11:07 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-07 13:11:07 +0200 |
commit | 11c80f1d4985b21b5800b981428f7bf88fa9778b (patch) | |
tree | d1b66ae141541b3ff1b8e23139e7faa249c2cdde /module/plugins/Plugin.py | |
parent | unrar ram check (diff) | |
download | pyload-11c80f1d4985b21b5800b981428f7bf88fa9778b.tar.xz |
recycle sqlite connection
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 55faa37e1..bfe10845d 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -31,6 +31,7 @@ from os import chmod from os import stat from os.path import exists from os.path import join +from os.path import basename if os.name != "nt": from os import chown @@ -296,13 +297,14 @@ class Plugin(object): name = self.pyfile.name.encode(sys.getfilesystemencoding(), "replace") newname = self.req.download(url, name, location, get, post, ref, cookies) - + newname = basename(newname) + self.pyfile.size = self.req.dl_size if newname and newname != name: self.log.info("%(name)s saved as %(newname)s" % {"name": name, "newname": newname}) name = newname - self.pyfile.name = newname + #self.pyfile.name = newname if self.core.config["permission"]["change_file"]: chmod(join(location, name), int(self.core.config["permission"]["file"],8)) |