summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/UnRar.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/UnRar.py')
-rw-r--r--module/plugins/hooks/UnRar.py5
1 files changed, 3 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"):