diff options
-rw-r--r-- | module/PluginThread.py | 2 | ||||
-rw-r--r-- | module/gui/connector.py | 2 | ||||
-rw-r--r-- | module/plugins/Plugin.py | 14 | ||||
-rw-r--r-- | module/web/settings.py | 2 | ||||
-rwxr-xr-x | pyLoadCore.py | 15 |
5 files changed, 14 insertions, 21 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py index 311d80ba4..90ad9ec26 100644 --- a/module/PluginThread.py +++ b/module/PluginThread.py @@ -27,7 +27,7 @@ from traceback import print_exc, format_exc from pprint import pformat from sys import exc_info, exc_clear from types import MethodType -from os.path import join, exists +from os.path import exists from pycurl import error diff --git a/module/gui/connector.py b/module/gui/connector.py index 14cf77ebb..907475726 100644 --- a/module/gui/connector.py +++ b/module/gui/connector.py @@ -16,7 +16,7 @@ @author: mkaay """ -SERVER_VERSION = "0.4.3" +SERVER_VERSION = "0.4.4" from time import sleep from uuid import uuid4 as uuid diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 79bc753ac..8e48e0ff3 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -330,30 +330,28 @@ class Plugin(object): name = self.pyfile.name filename = save_join(location, name) try: - 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, chunks=self.getChunkCount(), resume=self.resumeDownload, progressNotify=self.pyfile.progress.setValue) finally: self.pyfile.size = self.req.size - newname = basename(filename) - - if newname and newname != name: + if newname and newname != filename: self.log.info("%(name)s saved as %(newname)s" % {"name": name, "newname": newname}) - name = newname #self.pyfile.name = newname + filename = newname if self.core.config["permission"]["change_file"]: - chmod(join(location, name), int(self.core.config["permission"]["file"],8)) + chmod(filename, int(self.core.config["permission"]["file"],8)) if self.core.config["permission"]["change_dl"] and os.name != "nt": try: uid = getpwnam(self.config["permission"]["user"])[2] gid = getgrnam(self.config["permission"]["group"])[2] - chown(join(location, name), uid, gid) + chown(filename, uid, gid) except Exception,e: self.log.warning(_("Setting User and Group failed: %s") % str(e)) - self.lastDownload = join(location, name) + self.lastDownload = filename return self.lastDownload def checkDownload(self, rules, api_size=0 ,max_size=50000, delete=True, read_size=0): diff --git a/module/web/settings.py b/module/web/settings.py index 3b392cf37..5a836e11c 100644 --- a/module/web/settings.py +++ b/module/web/settings.py @@ -8,7 +8,7 @@ import os import sys
import django
-SERVER_VERSION = "0.4.2"
+SERVER_VERSION = "0.4.4"
PROJECT_DIR = os.path.dirname(__file__)
diff --git a/pyLoadCore.py b/pyLoadCore.py index 7ad0f359b..d9bbc4040 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -18,14 +18,13 @@ @author: sebnapi @author: RaNaN @author: mkaay - @version: v0.4.3 + @version: v0.4.4 """ -CURRENT_VERSION = '0.4.3' +CURRENT_VERSION = '0.4.4' import __builtin__ -from getopt import GetoptError -from getopt import getopt +from getopt import getopt, GetoptError import gettext from imp import find_module import logging @@ -38,15 +37,11 @@ from os import makedirs from os import name as platform from os import remove from os import sep -from os.path import exists -from os.path import join +from os.path import exists, join import signal import subprocess import sys -from sys import argv -from sys import executable -from sys import exit -import thread +from sys import argv, executable, exit import time from time import sleep from traceback import print_exc |