diff --git a/headphones/librarysync.py b/headphones/librarysync.py index 4a4a4e16..6fe13e17 100644 --- a/headphones/librarysync.py +++ b/headphones/librarysync.py @@ -61,7 +61,7 @@ def libraryScan(dir=None, append=False, ArtistID=None, ArtistName=None, cron=Fal del_have_tracks = myDB.select('SELECT Location, Matched, ArtistName from have') for track in del_have_tracks: - encoded_track_string = track['Location'].encode(headphones.SYS_ENCODING) + encoded_track_string = track['Location'].encode(headphones.SYS_ENCODING, 'replace') if not os.path.isfile(encoded_track_string): if track['ArtistName']: #Make sure deleted files get accounted for when updating artist track counts diff --git a/headphones/sab.py b/headphones/sab.py index 52d8e3e1..a577f020 100644 --- a/headphones/sab.py +++ b/headphones/sab.py @@ -69,7 +69,7 @@ def sendNZB(nzb): if headphones.SAB_HOST.endswith('/'): headphones.SAB_HOST = headphones.SAB_HOST[0:len(headphones.SAB_HOST)-1] - + url = headphones.SAB_HOST + "/" + "api?" + urllib.urlencode(params) try: