mirror of
https://github.com/rembo10/headphones.git
synced 2026-04-23 21:39:28 +01:00
Remove unidecode for windows file names
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user