diff --git a/headphones/helpers.py b/headphones/helpers.py index 6a117fc1..acc64fd3 100644 --- a/headphones/helpers.py +++ b/headphones/helpers.py @@ -22,7 +22,6 @@ import time import sys import tempfile import glob -from unidecode import unidecode from beets import logging as beetslogging import six @@ -225,11 +224,6 @@ def replace_illegal_chars(string, type="file"): string = re.sub('[\?"*:|<>/]', '_', string) if type == "folder": string = re.sub('[:\?<>"|*]', '_', string) - - # Asciify windows file/folder names - if sys.platform == "win32": - string = unidecode(string) - return string diff --git a/headphones/webserve.py b/headphones/webserve.py index f1fbbfbe..9d703a5c 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -348,17 +348,17 @@ class WebInterface(object): dirs = set(dirs) - for dir in dirs: - artistfolder = os.path.join(dir, folder) - if not os.path.isdir(artistfolder.encode(headphones.SYS_ENCODING)): - logger.debug("Cannot find directory: " + artistfolder) - continue - try: + try: + for dir in dirs: + artistfolder = os.path.join(dir, folder) + if not os.path.isdir(artistfolder.encode(headphones.SYS_ENCODING)): + logger.debug("Cannot find directory: " + artistfolder) + continue threading.Thread(target=librarysync.libraryScan, kwargs={"dir": artistfolder, "artistScan": True, "ArtistID": ArtistID, "ArtistName": artist_name}).start() - except Exception as e: - logger.error('Unable to complete the scan: %s' % e) + except Exception as e: + logger.error('Unable to complete the scan: %s' % e) raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID)