diff options
| author | 2010-09-16 17:27:32 +0200 | |
|---|---|---|
| committer | 2010-09-16 17:27:32 +0200 | |
| commit | 353276e59af0d94085645e5cd46342f6704c244b (patch) | |
| tree | 2464661c9b12947fa2ebf99548f6f7a73e7a0ff7 /module | |
| parent | cli command mode (diff) | |
| download | pyload-353276e59af0d94085645e5cd46342f6704c244b.tar.xz | |
unrar fix
Diffstat (limited to 'module')
| -rw-r--r-- | module/plugins/hooks/UnRar.py | 5 | ||||
| -rw-r--r-- | module/web/ajax/views.py | 1 | 
2 files changed, 4 insertions, 2 deletions
diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py index 8acc853d4..6bd650b4a 100644 --- a/module/plugins/hooks/UnRar.py +++ b/module/plugins/hooks/UnRar.py @@ -56,14 +56,15 @@ class UnRar(Hook):      def addPassword(self, pws):          if not type(pws) == list: pws = [pws] +        pws.reverse()          for pw in pws:              pw = pw.strip()              if not pw or pw == "None" or pw in self.passwords: continue              self.passwords.insert(0, pw)          with open(self.getConfig("passwordfile"), "w") as f: -            f.writelines(self.comments) -            f.writelines(self.passwords) +            f.writelines([c+"\n" for c in self.comments]) +            f.writelines([p+"\n" for p in self.passwords])      def removeFiles(self, pack, fname):          if not self.getConfig("deletearchive"): diff --git a/module/web/ajax/views.py b/module/web/ajax/views.py index 9430a54d4..166356ceb 100644 --- a/module/web/ajax/views.py +++ b/module/web/ajax/views.py @@ -287,6 +287,7 @@ def edit_package(request):                  "password": request.POST.get("pack_pws")}          settings.PYLOAD.set_package_data(id, data) +        return JsonResponse("success")      except:          return HttpResponseServerError()  | 
