From 0f6dbccaa3af4540b7ad29de7d3601592c447cde Mon Sep 17 00:00:00 2001 From: rembo10 Date: Wed, 24 Jul 2013 11:01:15 +0530 Subject: [PATCH] Fixed some typos, got rid of test log message --- headphones/searcher.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index f8304538..6efbc0be 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -1293,7 +1293,7 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False): for result in resultlist: if high_size_limit and (result[1] > high_size_limit): - logger.info(result[0] + " is too large for this album - not considering it. (Size: " + helpers.bytes_to_mb(result[1]) + ", Maxsize: " + helpers.bytes_to_mb(high_size_limit)) + logger.info(result[0] + " is too large for this album - not considering it. (Size: " + helpers.bytes_to_mb(result[1]) + ", Maxsize: " + helpers.bytes_to_mb(high_size_limit) + ")") # Add lossless nzbs to the "flac list" which we can use if there are no good lossy matches if 'flac' in result[0].lower(): @@ -1302,7 +1302,7 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False): continue if low_size_limit and (result[1] < low_size_limit): - logger.info(result[0] + " is too small for this album - not considering it. (Size: " + helpers.bytes_to_mb(result[1]) + ", Minsize: " + helpers.bytes_to_mb(low_size_limit)) + logger.info(result[0] + " is too small for this album - not considering it. (Size: " + helpers.bytes_to_mb(result[1]) + ", Minsize: " + helpers.bytes_to_mb(low_size_limit) + ")") continue delta = abs(targetsize - result[1]) @@ -1310,7 +1310,7 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False): torrentlist = sorted(newlist, key=lambda title: (-title[4], title[5])) - if not len(nzblist) and len(flac_list) and headphones.PREFERRED_BITRATE_ALLOW_LOSSLESS: + if not len(torrentlist) and len(flac_list) and headphones.PREFERRED_BITRATE_ALLOW_LOSSLESS: logger.info("Since there were no appropriate lossy matches (and at least one lossless match), going to use lossless instead") torrentlist = sorted(flac_list, key=lambda title: (-title[4], -title[1])) @@ -1348,8 +1348,6 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False): (data, bestqual) = preprocesstorrent(torrentlist, pre_sorted_results) - logger.info(u"Made it out") - if data and bestqual: logger.info(u'Found best result from %s: %s - %s' % (bestqual[3], bestqual[2], bestqual[0], helpers.bytes_to_mb(bestqual[1]))) torrent_folder_name = '%s - %s [%s]' % (helpers.latinToAscii(albums[0]).encode('UTF-8').replace('/', '_'), helpers.latinToAscii(albums[1]).encode('UTF-8').replace('/', '_'), year)