merge-requests/30/head
Bob Mottram 2024-02-05 12:49:36 +00:00
parent 50fdb97cf0
commit 315f404ee3
1 changed files with 8 additions and 10 deletions

View File

@ -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