Browse Source

Merge pull request #7180 from kumy/develop

Extend ignore patterns
pull/7154/head
Ruud Burger 8 years ago
committed by GitHub
parent
commit
97aedad70c
  1. 5
      couchpotato/core/plugins/scanner.py

5
couchpotato/core/plugins/scanner.py

@ -28,6 +28,7 @@ class Scanner(Plugin):
'_failed_rename_', '.appledouble', '.appledb', '.appledesktop', os.path.sep + '._', '.ds_store', 'cp.cpnfo',
'thumbs.db', 'ehthumbs.db', 'desktop.ini'] # unpacking, smb-crap, hidden files
ignore_names = ['extract', 'extracting', 'extracted', 'movie', 'movies', 'film', 'films', 'download', 'downloads', 'video_ts', 'audio_ts', 'bdmv', 'certificate']
ignored_extensions = ['ignore', 'lftp-pget-status']
extensions = {
'movie': ['mkv', 'wmv', 'avi', 'mpg', 'mpeg', 'mp4', 'm2ts', 'iso', 'img', 'mdf', 'ts', 'm4v', 'flv'],
'movie_extra': ['mds'],
@ -225,12 +226,12 @@ class Scanner(Plugin):
group['unsorted_files'].extend(found_files)
leftovers = leftovers - found_files
has_ignored += 1 if ext == 'ignore' else 0
has_ignored += 1 if ext in self.ignored_extensions else 0
if has_ignored == 0:
for file_path in list(group['unsorted_files']):
ext = getExt(file_path)
has_ignored += 1 if ext == 'ignore' else 0
has_ignored += 1 if ext in self.ignored_extensions else 0
if has_ignored > 0:
ignored_identifiers.append(identifier)

Loading…
Cancel
Save