mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 18:45:32 +01:00
Took out the str(download_dir)/unicode escape clause in postprocessor, changed fallback retention to 2000 days, changed if term <> various artists to if term != various artists
This commit is contained in:
@@ -111,11 +111,6 @@ def verify(albumid, albumpath):
|
||||
tracks = myDB.select('SELECT * from tracks WHERE AlbumID=?', [albumid])
|
||||
|
||||
downloaded_track_list = []
|
||||
|
||||
try:
|
||||
albumpath = str(albumpath)
|
||||
except UnicodeEncodeError:
|
||||
albumpath = unicode(albumpath).encode('unicode_escape')
|
||||
|
||||
for r,d,f in os.walk(albumpath):
|
||||
for files in f:
|
||||
@@ -203,6 +198,10 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list)
|
||||
if headphones.MOVE_FILES and headphones.DESTINATION_DIR:
|
||||
albumpath = moveFiles(albumpath, release, tracks)
|
||||
|
||||
if headphones.MOVE_FILES and not headphones.DESTINATION_DIR:
|
||||
logger.error('No DESTINATION_DIR has been set. Set "Destination Directory" to the parent directory you want to move the files to')
|
||||
pass
|
||||
|
||||
myDB = db.DBConnection()
|
||||
# There's gotta be a better way to update the have tracks - sqlite
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ def verifyresult(title, artistterm, term):
|
||||
|
||||
title = re.sub('[\.\-\/\_]', ' ', title)
|
||||
|
||||
if artistterm <> 'Various Artists':
|
||||
if artistterm != 'Various Artists':
|
||||
|
||||
if not re.search('^' + re.escape(artistterm), title, re.IGNORECASE):
|
||||
logger.info("Removed from results: " + title + " (artist not at string start).")
|
||||
@@ -487,7 +487,7 @@ def getresultNZB(result):
|
||||
def preprocess(resultlist):
|
||||
|
||||
if not headphones.USENET_RETENTION:
|
||||
usenet_retention = 1000
|
||||
usenet_retention = 2000
|
||||
else:
|
||||
usenet_retention = int(headphones.USENET_RETENTION)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user