diff --git a/headphones/librarysync.py b/headphones/librarysync.py index ba246ff0e..c221d31e4 100644 --- a/headphones/librarysync.py +++ b/headphones/librarysync.py @@ -20,6 +20,10 @@ from beets.mediafile import MediaFile, FileTypeError, UnreadableFileError from headphones import db, logger, helpers, importer, lastfm +# encoding=utf8 +import sys +reload(sys) +sys.setdefaultencoding('utf8') # You can scan a single directory and append it to the current library by # specifying append=True, ArtistID and ArtistName. diff --git a/headphones/searcher.py b/headphones/searcher.py index 0dc81b546..8a2f8f304 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -39,6 +39,11 @@ from headphones import utorrent, transmission, notifiers, rutracker, deluge, qbittorrent from bencode import bencode, bdecode +# encoding=utf8 +import sys +reload(sys) +sys.setdefaultencoding('utf8') + # Magnet to torrent services, for Black hole. Stolen from CouchPotato. TORRENT_TO_MAGNET_SERVICES = [ # 'https://zoink.it/torrent/%s.torrent',