diff --git a/sickbeard/postProcessor.py b/sickbeard/postProcessor.py index 0d7c8c1f34e5ad8e76c1d1765466b722a133392c..1952328d5ce231da47d6f22c30857b02c6151535 100755 --- a/sickbeard/postProcessor.py +++ b/sickbeard/postProcessor.py @@ -50,7 +50,8 @@ class PostProcessor(object): EXISTS_SAME = 2 EXISTS_SMALLER = 3 DOESNT_EXIST = 4 - + + IGNORED_FILESTRINGS = [ "/.AppleDouble/", ".DS_Store" ] def __init__(self, file_path, nzb_name = None): # absolute path to the folder that is being processed self.folder_path = ek.ek(os.path.dirname, ek.ek(os.path.abspath, file_path)) @@ -85,7 +86,7 @@ class PostProcessor(object): # if the new file exists, return the appropriate code depending on the size if ek.ek(os.path.isfile, existing_file): - + # see if it's bigger than our old file if ek.ek(os.path.getsize, existing_file) > ek.ek(os.path.getsize, self.file_path): self._log(u"File "+existing_file+" is larger than "+self.file_path, logger.DEBUG) @@ -597,6 +598,10 @@ class PostProcessor(object): if os.path.isdir( self.file_path ): self._log(u"File "+self.file_path+" seems to be a directory") return False + for ignore_file in self.IGNORED_FILESTRINGS: + if ignore_file in self.file_path: + self._log(u"File {0} is ignored type, skipping".format( self.file_path ) ) + return False # reset per-file stuff self.in_history = False