diff --git a/CHANGES.md b/CHANGES.md index a9fc46c6..718eca4e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ * Update thefuzz 0.19.0 (c2cd4f4) to 0.21.0 (0b49e4a) * Update urllib3 2.0.5 (d9f85a7) to 2.0.7 (56f01e0) * Add support for Brotli compression +* Add ignore Plex extras ### 3.30.4 (2023-10-12 11:50:00 UTC) diff --git a/sickgear/helpers.py b/sickgear/helpers.py index 1643a1db..69bc0d37 100644 --- a/sickgear/helpers.py +++ b/sickgear/helpers.py @@ -158,7 +158,9 @@ def has_media_ext(filename): return False sep_file = filename.rpartition('.') - return (None is re.search('extras?$', sep_file[0], re.I)) and (sep_file[2].lower() in mediaExtensions) + return (None is re.search( + '(?:extras|-Behind\sThe\sScenes|-Deleted\sScenes|-Featurettes|-Interviews|-Scenes|-Shorts|-Trailers|-Other)?$', + sep_file[0], re.I)) and (sep_file[2].lower() in mediaExtensions) def has_image_ext(filename): @@ -352,8 +354,11 @@ def list_media_files(path): if [direntry for direntry in scantree(path, include=[r'\.sickgearignore'], filter_kind=False, recurse=False)]: logger.debug('Skipping folder "%s" because it contains ".sickgearignore"' % path) else: - result = [direntry.path for direntry in scantree(path, exclude=['Extras'], filter_kind=False, - exclude_folders_with_files=['.sickgearignore']) + result = [direntry.path for direntry in scantree(path, exclude=[ + 'Extras', + 'Behind The Scenes', 'Deleted Scenes', 'Featurettes', + 'Interviews', 'Scenes', 'Shorts', 'Trailers', 'Other' + ], filter_kind=False, exclude_folders_with_files=['.sickgearignore']) if has_media_ext(direntry.name)] return result