From e4ad0a328de3da3e87e43561b9e26284432cc2af Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Mon, 17 Jun 2013 19:38:09 +0200 Subject: [PATCH] fix decrypt/pack params for -d/--download cli --- GUI/VenPri.py | 21 ++++++--------------- Qwad.pyw | 2 +- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/GUI/VenPri.py b/GUI/VenPri.py index 38d3d53..349522e 100644 --- a/GUI/VenPri.py +++ b/GUI/VenPri.py @@ -15,6 +15,9 @@ import binascii CWD = os.getcwd() +def str2bool(v): + return v.lower() in ("yes", "true", "t", "1") + class MWQwad(QMainWindow, Ui_Qwad): """ Class documentation goes here. @@ -342,18 +345,6 @@ class UnpackingCLI(Thread): print e print "Done" -class UnpackingCLIX(Thread): - def __init__(self, wadpath, dirpath): - Thread.__init__(self) - self.wadpath = wadpath - self.dirpath = dirpath - def run(self): - try: - WAD.loadFile(self.wadpath).dumpDir(self.dirpath) - except Exception, e: - print e - print "Done" - class Packing(Unpacking): def __init__(self, dirpath, wadpath, QMW, deletedir = False): Unpacking.__init__(self, wadpath, dirpath, QMW) @@ -431,9 +422,9 @@ class nusDownloadingCLI(UnpackingCLI): self.version = int(version) else: self.version = None - self.decrypt = decrypt + self.decrypt = str2bool(decrypt) + self.pack = str2bool(pack) self.titleid = titleid - self.pack = pack self.outputdir = outputdir def run(self): try: @@ -443,7 +434,7 @@ class nusDownloadingCLI(UnpackingCLI): self.packing = PackingCLI(self.dirpath, str(self.outputdir), True) self.packing.start() else: - NUS(self.titleid,self.version).download(self.dirpath, decrypt = self.decrypt) + NUS(self.titleid,self.version).download(self.outputdir, decrypt = self.decrypt) except Exception, e: print e diff --git a/Qwad.pyw b/Qwad.pyw index 3558ee7..d1d96a7 100644 --- a/Qwad.pyw +++ b/Qwad.pyw @@ -26,7 +26,7 @@ class MultipleOption(Option): else: Option.take_action(self, action, dest, opt, value, values, parser) -VERSION = '0.7.1' +VERSION = '0.8' def opts(): description = """NUS-Downloader, WadManager and TMD-Viewer for Linux"""