Encoding fix

Fixes https://github.com/rembo10/headphones/issues/1754
This commit is contained in:
Ade
2014-07-31 11:31:25 +12:00
parent 326f866d7e
commit 2b02ae4196
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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: