Private GIT

Skip to content
Snippets Groups Projects
Commit b833ec1b authored by yaleman's avatar yaleman
Browse files

Added code to ignore certain files

As per issue 1853, ignoring certain OSX metadata.
parent 7a4287df
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ class PostProcessor(object):
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))
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment