mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
50fdb97cf0
commit
315f404ee3
18
media.py
18
media.py
|
@ -703,9 +703,10 @@ def archive_media(base_dir: str, archive_directory: str,
|
||||||
def path_is_video(path: str) -> bool:
|
def path_is_video(path: str) -> bool:
|
||||||
"""Is the given path a video file?
|
"""Is the given path a video file?
|
||||||
"""
|
"""
|
||||||
if path.endswith('.ogv') or \
|
extensions = get_video_extensions()
|
||||||
path.endswith('.mp4'):
|
for ext in extensions:
|
||||||
return True
|
if path.endswith('.' + ext):
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
@ -720,13 +721,10 @@ def path_is_transcript(path: str) -> bool:
|
||||||
def path_is_audio(path: str) -> bool:
|
def path_is_audio(path: str) -> bool:
|
||||||
"""Is the given path an audio file?
|
"""Is the given path an audio file?
|
||||||
"""
|
"""
|
||||||
if path.endswith('.ogg') or \
|
extensions = get_audio_extensions()
|
||||||
path.endswith('.opus') or \
|
for ext in extensions:
|
||||||
path.endswith('.spx') or \
|
if path.endswith('.' + ext):
|
||||||
path.endswith('.flac') or \
|
return True
|
||||||
path.endswith('.wav') or \
|
|
||||||
path.endswith('.mp3'):
|
|
||||||
return True
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue