mirror of
https://github.com/rembo10/headphones.git
synced 2026-04-11 15:39:26 +01:00
Fixed some typos, got rid of test log message
This commit is contained in:
@@ -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: <a href="%s">%s</a> - %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)
|
||||
|
||||
Reference in New Issue
Block a user