mirror of
https://github.com/rembo10/headphones.git
synced 2026-04-05 04:29:25 +01:00
Replace any errors when converting unicode album path to bytestring in checkFolder() - should fix issue #1100 when it fails to convert unicode chars to cp1252
This commit is contained in:
@@ -52,11 +52,11 @@ def checkFolder():
|
||||
sab_replace_spaces(sab_replace_dots(album['FolderName']))
|
||||
]
|
||||
|
||||
torrent_album_path = os.path.join(headphones.DOWNLOAD_TORRENT_DIR, album['FolderName']).encode(headphones.SYS_ENCODING)
|
||||
torrent_album_path = os.path.join(headphones.DOWNLOAD_TORRENT_DIR, album['FolderName']).encode(headphones.SYS_ENCODING,'replace')
|
||||
|
||||
for nzb_folder_name in nzb_album_possibilities:
|
||||
|
||||
nzb_album_path = os.path.join(headphones.DOWNLOAD_DIR, nzb_folder_name).encode(headphones.SYS_ENCODING)
|
||||
nzb_album_path = os.path.join(headphones.DOWNLOAD_DIR, nzb_folder_name).encode(headphones.SYS_ENCODING, 'replace')
|
||||
|
||||
if os.path.exists(nzb_album_path):
|
||||
logger.debug('Found %s in NZB download folder. Verifying....' % album['FolderName'])
|
||||
@@ -481,7 +481,7 @@ def moveFiles(albumpath, release, tracks):
|
||||
else:
|
||||
sortname = release['ArtistName']
|
||||
|
||||
if sortname.isdigit():
|
||||
if sortname[0].isdigit():
|
||||
firstchar = '0-9'
|
||||
else:
|
||||
firstchar = sortname[0]
|
||||
|
||||
Reference in New Issue
Block a user