From a364c435e4c3a15cda1d7fc5c38e9ad32f965a94 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 3 Apr 2014 22:37:32 -0700 Subject: [PATCH] Fixed a bug with nzbs --- headphones/searcher.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index d99a8d81..fc427609 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -130,7 +130,7 @@ def searchforalbum(albumid=None, new=False, losslessOnly=False): do_sorted_search(album, new, losslessOnly) else: - logger.info("Got to zero") + album = myDB.action('SELECT * from albums WHERE AlbumID=?', [albumid]).fetchone() logger.info('Searching for %s' % album['AlbumTitle']) do_sorted_search(album, new, losslessOnly) @@ -672,27 +672,27 @@ def send_to_downloader(data, bestqual, album): nzb = classes.NZBDataSearchResult() nzb.extraInfo.append(data) - nzb.name = nzb_folder_name + nzb.name = folder_name nzbget.sendNZB(nzb) elif headphones.NZB_DOWNLOADER == 0: nzb = classes.NZBDataSearchResult() nzb.extraInfo.append(data) - nzb.name = nzb_folder_name + nzb.name = folder_name sab.sendNZB(nzb) # If we sent the file to sab, we can check how it was renamed and insert that into the snatched table (replace_spaces, replace_dots) = sab.checkConfig() if replace_dots: - nzb_folder_name = helpers.sab_replace_dots(nzb_folder_name) + folder_name = helpers.sab_replace_dots(folder_name) if replace_spaces: - nzb_folder_name = helpers.sab_replace_spaces(nzb_folder_name) + folder_name = helpers.sab_replace_spaces(folder_name) else: - nzb_name = nzb_folder_name + '.nzb' + nzb_name = folder_name + '.nzb' download_path = os.path.join(headphones.BLACKHOLE_DIR, nzb_name) try: prev = os.umask(headphones.UMASK)