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:
Remy
2011-08-10 20:22:09 -07:00
parent 5782b5bed5
commit 8dddc92e9d
2 changed files with 6 additions and 7 deletions

View File

@@ -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

View File

@@ -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)