From 1d7415b91dc6f218e03d7f7aabd2934f1b47405b Mon Sep 17 00:00:00 2001 From: rembo10 Date: Mon, 5 May 2014 18:56:47 -0700 Subject: [PATCH 1/2] Catch errors if we can't grab release info in post processor (#1602) --- headphones/postprocessor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 05e90880..787db7a8 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -71,17 +71,21 @@ def verify(albumid, albumpath, Kind=None, forced=False): try: release_list = mb.getReleaseGroup(albumid) except Exception, e: - logger.info('Unable to get release information for manual album with rgid: %s. Error: %s' % (albumid, e)) + logger.error('Unable to get release information for manual album with rgid: %s. Error: %s' % (albumid, e)) return if not release_list: - logger.info('Unable to get release information for manual album with rgid: %s' % albumid) + logger.error('Unable to get release information for manual album with rgid: %s' % albumid) return # Since we're just using this to create the bare minimum information to insert an artist/album combo, use the first release releaseid = release_list[0]['id'] release_dict = mb.getRelease(releaseid) + + if not release_dict: + logger.error('Unable to get release information for manual album with rgid: %s. Cannot continue' % albumid) + return logger.info(u"Now adding/updating artist: " + release_dict['artist_name']) From 83280f3f999268aeae785638b55080068c672a73 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Mon, 5 May 2014 23:43:32 -0700 Subject: [PATCH 2/2] Fix for #1603, typo in utorrent --- headphones/utorrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/utorrent.py b/headphones/utorrent.py index 7aad16f5..fbf1a462 100644 --- a/headphones/utorrent.py +++ b/headphones/utorrent.py @@ -63,7 +63,7 @@ def addTorrent(link): response = request.request_json(host, params=params, auth=auth, cookies=cookies) else: params = {'action':'add-file', 'token':token} - files = {'torrent_file':{'music.torrent', link}} + files = {'torrent_file':{'music.torrent' : link}} response = request.request_json(host, method="post", params=params, files=files, auth=auth, cookies=cookies) if not response: logger.error("Error sending torrent to uTorrent")