mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-21 20:35:05 +00:00
Merge branch 'feature/AddIgnorePlexExtras' into dev
This commit is contained in:
commit
d42232040f
2 changed files with 9 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue