diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index fd966bf7..d95ce049 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -136,10 +136,9 @@ def replaceExtension(filename, newExt): return sepFile[0] + "." + newExt -def isBtsyncFile(filename): - sepFile = filename.rpartition(".") - - if sepFile[2].lower() == '!sync': +def isSyncFile(filename): + extension = filename.rpartition(".")[2].lower() + if extension == '!sync' or extension == 'lftp-pget-status': return True else: return False diff --git a/sickbeard/processTV.py b/sickbeard/processTV.py index a02c09f2..53f4b5f8 100644 --- a/sickbeard/processTV.py +++ b/sickbeard/processTV.py @@ -138,11 +138,11 @@ def processDir(dirName, nzbName=None, process_method=None, force=False, is_prior path, dirs, files = get_path_dir_files(dirName, nzbName, type) - btsyncFiles = filter(helpers.isBtsyncFile, files) + SyncFiles = filter(helpers.isSyncFile, files) - # Don't post process if files are still being synced from btsync - if btsyncFiles: - returnStr += logHelper(u"Found .!sync files, skipping post processing", logger.ERROR) + # Don't post process if files are still being synced + if SyncFiles: + returnStr += logHelper(u"Found temporary sync files, skipping post processing", logger.ERROR) return returnStr returnStr += logHelper(u"PostProcessing Path: " + path, logger.DEBUG) @@ -186,11 +186,11 @@ def processDir(dirName, nzbName=None, process_method=None, force=False, is_prior for processPath, processDir, fileList in ek.ek(os.walk, ek.ek(os.path.join, path, dir), topdown=False): - btsyncFiles = filter(helpers.isBtsyncFile, fileList) + SyncFiles = filter(helpers.isSyncFile, fileList) - # Don't post process if files are still being synced from btsync - if btsyncFiles: - returnStr += logHelper(u"Found .!sync files, skipping post processing", logger.ERROR) + # Don't post process if files are still being synced + if SyncFiles: + returnStr += logHelper(u"Found temporary sync files, skipping post processing", logger.ERROR) return returnStr rarFiles = filter(helpers.isRarFile, fileList)