diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-04-24 19:46:59 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-04-24 19:46:59 +0200 |
commit | 1ef8f2435ec72fac64505fc11939e94665e11eef (patch) | |
tree | 76eb662a771923479e894b9c160a9b46326f33d1 /module/plugins/Plugin.py | |
parent | bitshare fixes (diff) | |
download | pyload-1ef8f2435ec72fac64505fc11939e94665e11eef.tar.xz |
parse content disposition
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r-- | module/plugins/Plugin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 488d05432..5607b8331 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -327,7 +327,7 @@ class Plugin(object): return res - def download(self, url, get={}, post={}, ref=True, cookies=True): + def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=True): """ downloads the url content to disk """ self.pyfile.setStatus("downloading") @@ -355,13 +355,13 @@ class Plugin(object): filename = save_join(location, name) try: - newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, chunks=self.getChunkCount(), resume=self.resumeDownload, progressNotify=self.pyfile.progress.setValue) + newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, cookies=cookies, chunks=self.getChunkCount(), resume=self.resumeDownload, progressNotify=self.pyfile.progress.setValue, disposition=disposition) finally: self.pyfile.size = self.req.size if newname and newname != filename: self.log.info("%(name)s saved as %(newname)s" % {"name": name, "newname": newname}) - #self.pyfile.name = newname + self.pyfile.name = newname filename = newname if self.core.config["permission"]["change_file"]: |