From a32f688ca2fb72eaac8f049081fb8d5167ebe03f Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Sun, 21 Apr 2013 22:40:58 +0930 Subject: [PATCH] Move media container split outside of for loop. --- DeleteSamples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeleteSamples.py b/DeleteSamples.py index 8ca47c31..5cb06516 100755 --- a/DeleteSamples.py +++ b/DeleteSamples.py @@ -100,12 +100,12 @@ if os.environ.has_key('NZBOP_SCRIPTDIR') and not os.environ['NZBOP_VERSION'][0:5 # All checks done, now launching the script. + mediaContainer = os.environ['NZBPO_MEDIAEXTENSIONS'].split(',') for dirpath, dirnames, filenames in os.walk(os.environ['NZBPP_DIRECTORY']): for file in filenames: filePath = os.path.join(dirpath, file) fileName, fileExtension = os.path.splitext(file) - mediaContainer = os.environ['NZBPO_MEDIAEXTENSIONS'].split(',') if fileExtension in mediaContainer: # If the file is a video file if is_sample(filePath, os.environ['NZBPP_NZBNAME'], os.environ['NZBPO_MAXSAMPLESIZE']): # Ignore samples