Suppor for non-ASCII characters in filenames

When a filename has characters like ñ or Á, an encoding exception is thrown (e.g. UnicodeEncodeError: 'ascii' codec can't encode character...)
This fixes it.
This commit is contained in:
kounch 2017-05-15 09:49:53 +02:00 committed by evilhero
parent 259dac8474
commit 24dd025cc3
1 changed files with 1 additions and 1 deletions

View File

@ -2273,7 +2273,7 @@ def crc(filename):
#speed in lieu of memory (file into memory entirely)
#return "%X" % (zlib.crc32(open(filename, "rb").read()) & 0xFFFFFFFF)
filename = filename.encode(mylar.SYS_ENCODING)
return hashlib.md5(filename).hexdigest()
def issue_find_ids(ComicName, ComicID, pack, IssueNumber):