From c56a7e6b61890a514ef8e511ac8cb14d40547beb Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sat, 21 Apr 2012 12:22:51 +0530 Subject: [PATCH] Also check the torrent download folder for completed downloads --- headphones/postprocessor.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 550f2c3c..84668746 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -19,11 +19,17 @@ def checkFolder(): if album['FolderName']: - album_path = os.path.join(headphones.DOWNLOAD_DIR, album['FolderName']).encode(headphones.SYS_ENCODING) + nzb_album_path = os.path.join(headphones.DOWNLOAD_DIR, album['FolderName']).encode(headphones.SYS_ENCODING) + torrent_album_path = os.path.join(headphones.DOWNLOAD_TORRENT_DIR, album['FolderName']).encode(headphones.SYS_ENCODING) - if os.path.exists(album_path): - logger.debug('Found %s. Verifying....' % album['FolderName']) - verify(album['AlbumID'], album_path) + if os.path.exists(nzb_album_path): + logger.debug('Found %s in NZB download folder. Verifying....' % album['FolderName']) + verify(album['AlbumID'], nzb_album_path) + + elif os.path.exists(nzb_album_path): + logger.debug('Found %s in torrent download folder. Verifying....' % album['FolderName']) + verify(album['AlbumID'], torrent_album_path) + def verify(albumid, albumpath):