From 8c997478987e411cfac1678a42b81c1ece2ea41d Mon Sep 17 00:00:00 2001 From: Zykino Date: Sat, 18 Jan 2020 14:53:32 +0100 Subject: [PATCH] Remove the CLI input decoding --- lib/utils.py | 14 -------------- prismedia_upload.py | 1 - 2 files changed, 15 deletions(-) diff --git a/lib/utils.py b/lib/utils.py index 0a22383..94acfcd 100644 --- a/lib/utils.py +++ b/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) diff --git a/prismedia_upload.py b/prismedia_upload.py index 4d9ec53..5c7c99f 100755 --- a/prismedia_upload.py +++ b/prismedia_upload.py @@ -223,7 +223,6 @@ if __name__ == '__main__': '--version': bool }) - utils.decodeArgumentStrings(options, locale.getpreferredencoding()) options = utils.parseNFO(options) if not options.get('--thumbnail'):