mirror of https://github.com/evilhero/mylar
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:
parent
259dac8474
commit
24dd025cc3
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue