mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-15 01:15:05 +00:00
Add ignore Plex extras.
https://support.plex.tv/articles/local-files-for-tv-show-trailers-and-extras/
This commit is contained in:
parent
5d92b63b54
commit
cc117e909b
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 thefuzz 0.19.0 (c2cd4f4) to 0.21.0 (0b49e4a)
|
||||||
* Update urllib3 2.0.5 (d9f85a7) to 2.0.7 (56f01e0)
|
* Update urllib3 2.0.5 (d9f85a7) to 2.0.7 (56f01e0)
|
||||||
* Add support for Brotli compression
|
* Add support for Brotli compression
|
||||||
|
* Add ignore Plex extras
|
||||||
|
|
||||||
|
|
||||||
### 3.30.4 (2023-10-12 11:50:00 UTC)
|
### 3.30.4 (2023-10-12 11:50:00 UTC)
|
||||||
|
|
|
@ -158,7 +158,9 @@ def has_media_ext(filename):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
sep_file = filename.rpartition('.')
|
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):
|
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)]:
|
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)
|
logger.debug('Skipping folder "%s" because it contains ".sickgearignore"' % path)
|
||||||
else:
|
else:
|
||||||
result = [direntry.path for direntry in scantree(path, exclude=['Extras'], filter_kind=False,
|
result = [direntry.path for direntry in scantree(path, exclude=[
|
||||||
exclude_folders_with_files=['.sickgearignore'])
|
'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)]
|
if has_media_ext(direntry.name)]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue