1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2025-02-24 15:00:30 +00:00

Support for non-ASCII characters in filenames

When a filename has characters like ñ or Á, a decoding exception is thrown (e.g. UnicodeDecodeError: 'ascii' codec can't decode byte...)
This fixes it.
This commit is contained in:
kounch 2017-05-15 09:46:11 +02:00 committed by evilhero
parent 377c25f69b
commit 259dac8474

View file

@ -341,7 +341,7 @@ class PostProcessor(object):
for fl in filelist['comiclist']:
if mylar.ENABLE_TORRENTS:
crcchk = None
tcrc = helpers.crc(os.path.join(fl['comiclocation'], fl['comicfilename']))
tcrc = helpers.crc(os.path.join(fl['comiclocation'], fl['comicfilename'].decode(mylar.SYS_ENCODING)))
crcchk = [x for x in pp_crclist if tcrc == x['crc']]
if crcchk:
logger.fdebug('Already post-processed this item %s - Ignoring' % crcchk)