From d34455af3fa05cfc8bb73233ace65780cafa6d36 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Mon, 7 Apr 2014 01:30:41 +0200 Subject: [PATCH] Bugfixes --- headphones/postprocessor.py | 2 +- headphones/searcher.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 3af26280..fe221467 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -362,7 +362,7 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list, if headphones.EMBED_ALBUM_ART or headphones.ADD_ALBUM_ART: artwork = request.request_content(album_art_path) - if not album_art_path or not artwor or len(artwork) < 100: + if not album_art_path or not artwork or len(artwork) < 100: logger.info("No suitable album art found from Amazon. Checking Last.FM....") artwork = albumart.getCachedArt(albumid) if not artwork or len(artwork) < 100: diff --git a/headphones/searcher.py b/headphones/searcher.py index 37a3314f..f35421ea 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -1307,9 +1307,9 @@ def preprocess(resultlist): return request.request_content(url=result[2], headers=headers), result else: - usenet_retention = headphones.USENET_RETENTION or 2000 - + usenet_retention = int(headphones.USENET_RETENTION or 2000) nzb = getresultNZB(result) + if nzb: try: d = minidom.parseString(nzb) @@ -1327,7 +1327,7 @@ def preprocess(resultlist): #TODO: Do we want rar checking in here to try to keep unknowns out? #or at least the option to do so? except Exception, e: - logger.error('Unable to parse the best result NZB. Error: %s. (Make sure your username/password/API is correct for provider: %s', e ,result[3]) + logger.exception('Unhandled exception. Unable to parse the best result NZB. Error: %s. (Make sure your username/password/API is correct for provider: %s', e ,result[3]) continue return nzb, result