diff --git a/headphones/importer.py b/headphones/importer.py index 4128f4b7..80163359 100644 --- a/headphones/importer.py +++ b/headphones/importer.py @@ -21,7 +21,7 @@ def scanMusic(dir=None): if any(files.endswith(x) for x in (".mp3", ".flac", ".aac", ".ogg", ".ape")): logger.debug('File found: %s' % files) try: - results.append(os.path.join(r, files)) + results.append(os.path.join(r.encode('UTF-8'), files.encode('UTF-8'))) except UnicodeDecodeError, e: logger.error('Can not decode file %s. Error: %s' % (str(files), str(e))) continue diff --git a/headphones/searcher.py b/headphones/searcher.py index 686caa52..f5a3289f 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -70,7 +70,7 @@ def searchNZB(albumid=None): logger.info('%s is larger than the maxsize for this category, skipping. (Size: %i bytes)' % (title, size)) except AttributeError, e: - logger.info(u"No results found.") + logger.info(u"No results found from NZBMatrix for %s" % term) if headphones.NEWZNAB: @@ -96,7 +96,7 @@ def searchNZB(albumid=None): if not len(d.entries): - logger.info(u"No results found.") + logger.info(u"No results found from %s for %s" % (headphones.NEWZNAB_HOST, term)) else: for item in d.entries: @@ -164,7 +164,7 @@ def searchNZB(albumid=None): else: - logger.info(u"Nothing found.") + logger.info('No results found from NZBs.org for %s' % term) if len(resultlist): @@ -194,7 +194,7 @@ def searchNZB(albumid=None): linkparams["cat"] = headphones.SAB_CATEGORY linkparams["name"] = downloadurl - linkparams["nzbname"] = ('%s - %s [%s]' % (albums[0], albums[1], year)) + linkparams["nzbname"] = ('%s - %s [%s]' % (albums[0].encode('UTF-8'), albums[1].encode('UTF-8'), year)) saburl = 'http://' + headphones.SAB_HOST + '/sabnzbd/api?' + urllib.urlencode(linkparams) logger.info(u"Sending link to SABNZBD: " + saburl) diff --git a/headphones/templates.py b/headphones/templates.py index 0c04e371..54fe1626 100644 --- a/headphones/templates.py +++ b/headphones/templates.py @@ -36,8 +36,8 @@ _nav = '''
''' diff --git a/headphones/webserve.py b/headphones/webserve.py index 32efab92..6f708da7 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -230,6 +230,7 @@ class WebInterface(object): page.append('''MusicBrainz Link: http://www.musicbrainz.org/artist/%sAlbums: