Commit e9fd2e56 authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Filter .torrent and .nzb from pp list of files

parent 3ac3233a
......@@ -160,6 +160,9 @@ def replaceExtension(filename, newExt):
return sepFile[0] + "." + newExt
def notTorNZBFile(filename):
return not (filename.endswith(".torrent") or filename.endswith(".nzb"))
def isSyncFile(filename):
extension = filename.rpartition(".")[2].lower()
#if extension == '!sync' or extension == 'lftp-pget-status' or extension == 'part' or extension == 'bts':
......
......@@ -155,12 +155,13 @@ def processDir(dirName, nzbName=None, process_method=None, force=False, is_prior
path, dirs, files = get_path_dir_files(dirName, nzbName, type)
files = filter(helpers.notTorNZBFile, files)
SyncFiles = filter(helpers.isSyncFile, files)
# Don't post process if files are still being synced and option is activated
if SyncFiles and sickbeard.POSTPONE_IF_SYNC_FILES:
postpone = True
nzbNameOriginal = nzbName
if not postpone:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment