From 39f07025c691e9201915c332bf808914636287e8 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Wed, 20 May 2015 10:26:04 -0700 Subject: [PATCH] Removed a check from postprocessor normalizedAlbumArtist/artistTitleCount, fixed some logging --- headphones/postprocessor.py | 2 +- headphones/searcher.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 8354c9ae..d5351234 100755 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -49,7 +49,7 @@ def checkFolder(): download_dir = headphones.CONFIG.DOWNLOAD_TORRENT_DIR album_path = os.path.join(download_dir, album['FolderName']).encode(headphones.SYS_ENCODING, 'replace') - logger.info("Checking if %s exists" % album_path) + logger.debug("Checking if %s exists" % album_path) if os.path.exists(album_path): logger.info('Found "' + album['FolderName'] + '" in ' + album['Kind'] + ' download folder. Verifying....') diff --git a/headphones/searcher.py b/headphones/searcher.py index 2d346799..70d05a0d 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -321,8 +321,10 @@ def more_filtering(results, album, albumlength, new): normalizedResultTitle = removeDisallowedFilenameChars(result[0]) artistTitleCount = normalizedResultTitle.count(normalizedAlbumArtist) - if normalizedAlbumArtist in normalizedAlbumTitle and artistTitleCount < 2: - continue + # WHAT DOES THIS DO? + #if normalizedAlbumArtist in normalizedAlbumTitle and artistTitleCount < 2: + # logger.info("Removing %s from %s" % (result[0], result[3])) + # continue if low_size_limit and (int(result[1]) < low_size_limit): logger.info("%s from %s is too small for this album - not considering it. (Size: %s, Minsize: %s)", result[0], result[3], helpers.bytes_to_mb(result[1]), helpers.bytes_to_mb(low_size_limit)) @@ -400,7 +402,7 @@ def sort_search_results(resultlist, album, new, albumlength): finallist = sorted(newlist, key=lambda title: (-title[5], title[6])) if not len(finallist) and len(flac_list) and headphones.CONFIG.PREFERRED_BITRATE_ALLOW_LOSSLESS: - logger.info("Since there were no appropriate lossy matches (and at least one lossless match, going to use lossless instead") + logger.info("Since there were no appropriate lossy matches (and at least one lossless match), going to use lossless instead") finallist = sorted(flac_list, key=lambda title: (title[5], int(title[1])), reverse=True) except Exception: logger.exception('Unhandled exception')