From b0fa43e5b9b2cba0a61927793f4d2717a108e8be Mon Sep 17 00:00:00 2001 From: rembo10 Date: Tue, 6 Nov 2012 18:07:46 -0500 Subject: [PATCH] Check the snatched db first for the folder name when forcing post-processing --- headphones/postprocessor.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 1cc07a7f..61cb8691 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -818,6 +818,15 @@ def forcePostProcess(): logger.info('Processing: %s' % folder_basename) + # First try to see if there's a match in the snatched table, then we'll try to parse the foldername + snatched = myDB.action('SELECT AlbumID, Title from snatched WHERE FolderName LIKE ?', [folder_basename]) + if snatched: + logger.info('Found a match in the database: %s. Verifying to make sure it is the correct album' % snatched['Title']) + verify(snatched['AlbumID'], folder) + continue + + # Try to parse the folder name into a valid format + # TODO: Add metadata lookup try: name, album, year = helpers.extract_data(folder_basename) except: