summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-02-03 16:56:58 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-02-03 16:56:58 +0100
commit5a55baef0362a2f2bb2395940c734d5faf553759 (patch)
tree07f7d9005d7c237ac12e93dda5041e87cbd58630
parentSO fix try (diff)
parentunrar destination fix (diff)
downloadpyload-5a55baef0362a2f2bb2395940c734d5faf553759.tar.xz
merge
-rw-r--r--module/plugins/hooks/UnRar.py8
-rw-r--r--module/web/pyload_app.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py
index 3a9e0b276..751c03987 100644
--- a/module/plugins/hooks/UnRar.py
+++ b/module/plugins/hooks/UnRar.py
@@ -131,16 +131,16 @@ class UnRar(Hook):
else:
folder = download_folder
- destination = None
+ destination = folder
if self.getConfig("unrar_destination") and not self.getConfig("unrar_destination").lower() == "none":
destination = self.getConfig("unrar_destination")
sub = "."
if self.core.config['general']['folder_per_package']:
sub = pack.folder.decode(sys.getfilesystemencoding())
- if not isabs(destination):
- destination = join(folder, destination, sub)
- else:
+ if isabs(destination):
destination = join(destination, sub)
+ else:
+ destination = join(folder, destination, sub)
u = Unrar(join(folder, fname), tmpdir=join(folder, "tmp"), ramSize=(self.ram if self.getConfig("ramwarning") else 0), cpu=self.getConfig("renice"))
try:
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py
index 3682a3962..70686532c 100644
--- a/module/web/pyload_app.py
+++ b/module/web/pyload_app.py
@@ -305,8 +305,8 @@ def config():
@route("/package_ui.js")
@login_required('can_see_dl')
def package_ui():
- response.header['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(time.time() + 60 * 60 * 24 * 7))
- response.header['Cache-control'] = "public"
+ response.headers['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(time.time() + 60 * 60 * 24 * 7))
+ response.headers['Cache-control'] = "public"
return render_to_response('package_ui.js')
@@ -478,4 +478,4 @@ def logs(item=-1):
fro = datetime.now()
if reversed:
data.reverse()
- return render_to_response('logs.html', {'warning': warning, 'log': data, 'from': fro.strftime('%d.%m.%Y %H:%M:%S'), 'reversed': reversed, 'perpage':perpage, 'perpage_p':sorted(perpage_p), 'iprev': 1 if item - perpage < 1 else item - perpage, 'inext': (item + perpage) if item+perpage < len(log) else item}, [pre_processor]) \ No newline at end of file
+ return render_to_response('logs.html', {'warning': warning, 'log': data, 'from': fro.strftime('%d.%m.%Y %H:%M:%S'), 'reversed': reversed, 'perpage':perpage, 'perpage_p':sorted(perpage_p), 'iprev': 1 if item - perpage < 1 else item - perpage, 'inext': (item + perpage) if item+perpage < len(log) else item}, [pre_processor])