mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 02:25:31 +01:00
Merge branch 'develop': Fix for searcher not firing if only nzbsrus or
nzbx are selected, fix for torrent temp folder on windows, strip whitespace from search terms
This commit is contained in:
@@ -320,7 +320,8 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list,
|
||||
logger.info('Starting post-processing for: %s - %s' % (release['ArtistName'], release['AlbumTitle']))
|
||||
# Check to see if we're preserving the torrent dir
|
||||
if headphones.KEEP_TORRENT_FILES and Kind=="torrent":
|
||||
new_folder = os.path.join(os.path.dirname(albumpath), ('temp' + release['AlbumTitle'][:5]).encode(headphones.SYS_ENCODING, 'replace'))
|
||||
new_folder = os.path.join(os.path.dirname(albumpath), ('temp' + release['AlbumTitle'][:8]).encode(headphones.SYS_ENCODING, 'replace'))
|
||||
new_folder = new_folder.strip()
|
||||
try:
|
||||
shutil.copytree(albumpath, new_folder)
|
||||
albumpath = new_folder
|
||||
|
||||
@@ -109,7 +109,7 @@ def searchforalbum(albumid=None, new=False, lossless=False):
|
||||
|
||||
for result in results:
|
||||
foundNZB = "none"
|
||||
if (headphones.NZBMATRIX or headphones.NEWZNAB or headphones.NZBSORG or headphones.NEWZBIN) and (headphones.SAB_HOST or headphones.BLACKHOLE):
|
||||
if (headphones.NZBMATRIX or headphones.NEWZNAB or headphones.NZBSORG or headphones.NEWZBIN or headphones.NZBX or headphones.NZBSRUS) and (headphones.SAB_HOST or headphones.BLACKHOLE):
|
||||
if result['Status'] == "Wanted Lossless":
|
||||
foundNZB = searchNZB(result['AlbumID'], new, losslessOnly=True)
|
||||
else:
|
||||
@@ -153,8 +153,8 @@ def searchNZB(albumid=None, new=False, losslessOnly=False):
|
||||
|
||||
dic = {'...':'', ' & ':' ', ' = ': ' ', '?':'', '$':'s', ' + ':' ', '"':'', ',':'', '*':'', '.':'', ':':''}
|
||||
|
||||
cleanalbum = helpers.latinToAscii(helpers.replace_all(albums[1], dic))
|
||||
cleanartist = helpers.latinToAscii(helpers.replace_all(albums[0], dic))
|
||||
cleanalbum = helpers.latinToAscii(helpers.replace_all(albums[1], dic)).strip()
|
||||
cleanartist = helpers.latinToAscii(helpers.replace_all(albums[0], dic)).strip()
|
||||
|
||||
# Use the provided search term if available, otherwise build a search term
|
||||
if albums[5]:
|
||||
|
||||
Reference in New Issue
Block a user