mirror of
https://gitlab.com/Nanolx/qwad.git
synced 2024-11-22 02:29:18 +01:00
fix decrypt/pack params for -d/--download cli
This commit is contained in:
parent
1ee994a384
commit
e4ad0a328d
@ -15,6 +15,9 @@ import binascii
|
|||||||
|
|
||||||
CWD = os.getcwd()
|
CWD = os.getcwd()
|
||||||
|
|
||||||
|
def str2bool(v):
|
||||||
|
return v.lower() in ("yes", "true", "t", "1")
|
||||||
|
|
||||||
class MWQwad(QMainWindow, Ui_Qwad):
|
class MWQwad(QMainWindow, Ui_Qwad):
|
||||||
"""
|
"""
|
||||||
Class documentation goes here.
|
Class documentation goes here.
|
||||||
@ -342,18 +345,6 @@ class UnpackingCLI(Thread):
|
|||||||
print e
|
print e
|
||||||
print "Done"
|
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):
|
class Packing(Unpacking):
|
||||||
def __init__(self, dirpath, wadpath, QMW, deletedir = False):
|
def __init__(self, dirpath, wadpath, QMW, deletedir = False):
|
||||||
Unpacking.__init__(self, wadpath, dirpath, QMW)
|
Unpacking.__init__(self, wadpath, dirpath, QMW)
|
||||||
@ -431,9 +422,9 @@ class nusDownloadingCLI(UnpackingCLI):
|
|||||||
self.version = int(version)
|
self.version = int(version)
|
||||||
else:
|
else:
|
||||||
self.version = None
|
self.version = None
|
||||||
self.decrypt = decrypt
|
self.decrypt = str2bool(decrypt)
|
||||||
|
self.pack = str2bool(pack)
|
||||||
self.titleid = titleid
|
self.titleid = titleid
|
||||||
self.pack = pack
|
|
||||||
self.outputdir = outputdir
|
self.outputdir = outputdir
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
try:
|
||||||
@ -443,7 +434,7 @@ class nusDownloadingCLI(UnpackingCLI):
|
|||||||
self.packing = PackingCLI(self.dirpath, str(self.outputdir), True)
|
self.packing = PackingCLI(self.dirpath, str(self.outputdir), True)
|
||||||
self.packing.start()
|
self.packing.start()
|
||||||
else:
|
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:
|
except Exception, e:
|
||||||
print e
|
print e
|
||||||
|
|
||||||
|
2
Qwad.pyw
2
Qwad.pyw
@ -26,7 +26,7 @@ class MultipleOption(Option):
|
|||||||
else:
|
else:
|
||||||
Option.take_action(self, action, dest, opt, value, values, parser)
|
Option.take_action(self, action, dest, opt, value, values, parser)
|
||||||
|
|
||||||
VERSION = '0.7.1'
|
VERSION = '0.8'
|
||||||
|
|
||||||
def opts():
|
def opts():
|
||||||
description = """NUS-Downloader, WadManager and TMD-Viewer for Linux"""
|
description = """NUS-Downloader, WadManager and TMD-Viewer for Linux"""
|
||||||
|
Loading…
Reference in New Issue
Block a user