remove .encode which creates byte vs string comparison issues. Fixes #1582

This commit is contained in:
clinton-hall 2019-03-15 20:42:21 +13:00
commit 19c3e1fd85
3 changed files with 36 additions and 36 deletions

View file

@ -90,14 +90,14 @@ def find_imdbid(dir_name, input_name, omdb_api_key):
def category_search(input_directory, input_name, input_category, root, categories):
tordir = False
try:
input_name = input_name.encode(core.SYS_ENCODING)
except Exception:
pass
try:
input_directory = input_directory.encode(core.SYS_ENCODING)
except Exception:
pass
#try:
# input_name = input_name.encode(core.SYS_ENCODING)
#except Exception:
# pass
#try:
# input_directory = input_directory.encode(core.SYS_ENCODING)
#except Exception:
# pass
if input_directory is None: # =Nothing to process here.
return input_directory, input_name, input_category, root

View file

@ -20,10 +20,10 @@ def sanitize_name(name):
# remove leading/trailing periods and spaces
name = name.strip(' .')
try:
name = name.encode(core.SYS_ENCODING)
except Exception:
pass
#try:
# name = name.encode(core.SYS_ENCODING)
#except Exception:
# pass
return name