mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Streamline is_media_file
This commit is contained in:
parent
0cccecb435
commit
4424e21786
1 changed files with 8 additions and 8 deletions
|
@ -45,14 +45,14 @@ def is_media_file(mediafile, media=True, audio=True, meta=True, archives=True, o
|
||||||
return False
|
return False
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
if (media and file_ext.lower() in core.MEDIACONTAINER) \
|
|
||||||
or (audio and file_ext.lower() in core.AUDIOCONTAINER) \
|
return any([
|
||||||
or (meta and file_ext.lower() in core.METACONTAINER) \
|
(media and file_ext.lower() in core.MEDIACONTAINER),
|
||||||
or (archives and is_archive_file(mediafile)) \
|
(audio and file_ext.lower() in core.AUDIOCONTAINER),
|
||||||
or (other and (file_ext.lower() in otherext or 'all' in otherext)):
|
(meta and file_ext.lower() in core.METACONTAINER),
|
||||||
return True
|
(archives and is_archive_file(mediafile)),
|
||||||
else:
|
(other and (file_ext.lower() in otherext or 'all' in otherext)),
|
||||||
return False
|
])
|
||||||
|
|
||||||
|
|
||||||
def list_media_files(path, min_size=0, delete_ignored=0, media=True, audio=True, meta=True, archives=True, other=False, otherext=None):
|
def list_media_files(path, min_size=0, delete_ignored=0, media=True, audio=True, meta=True, archives=True, other=False, otherext=None):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue