mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 17:39:16 +02:00
Remove the CLI input decoding
This commit is contained in:
parent
aa7aeed688
commit
8c99747898
2 changed files with 0 additions and 15 deletions
14
lib/utils.py
14
lib/utils.py
|
@ -196,17 +196,3 @@ def cleanString(toclean):
|
|||
cleaned = re.sub('[^A-Za-z0-9]+', '', toclean)
|
||||
|
||||
return cleaned
|
||||
|
||||
def decodeArgumentStrings(options, encoding):
|
||||
# Python crash when decoding from UTF-8 to UTF-8, so we prevent this
|
||||
if "utf-8" == encoding.lower():
|
||||
return;
|
||||
|
||||
if options["--name"] is not None:
|
||||
options["--name"] = options["--name"].decode(encoding)
|
||||
|
||||
if options["--description"] is not None:
|
||||
options["--description"] = options["--description"].decode(encoding)
|
||||
|
||||
if options["--tags"] is not None:
|
||||
options["--tags"] = options["--tags"].decode(encoding)
|
||||
|
|
|
@ -223,7 +223,6 @@ if __name__ == '__main__':
|
|||
'--version': bool
|
||||
})
|
||||
|
||||
utils.decodeArgumentStrings(options, locale.getpreferredencoding())
|
||||
options = utils.parseNFO(options)
|
||||
|
||||
if not options.get('--thumbnail'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue