diff --git a/media.py b/media.py index 962192824..1f84f7a10 100644 --- a/media.py +++ b/media.py @@ -416,6 +416,7 @@ def path_is_audio(path: str) -> bool: """ if path.endswith('.ogg') or \ path.endswith('.opus') or \ + path.endswith('.flac') or \ path.endswith('.mp3'): return True return False diff --git a/outbox.py b/outbox.py index 03b7d74b6..055d01933 100644 --- a/outbox.py +++ b/outbox.py @@ -313,6 +313,7 @@ def post_message_to_outbox(session, translate: {}, "avif": "avif", "audio/mpeg": "mp3", "ogg": "ogg", + "flac": "flac", "opus": "opus", "mp4": "mp4", "webm": "webm", diff --git a/webapp_media.py b/webapp_media.py index 082dc53c4..7ddedb862 100644 --- a/webapp_media.py +++ b/webapp_media.py @@ -227,7 +227,10 @@ def _add_embedded_video_from_sites(translate: {}, content: str, def _add_embedded_audio(translate: {}, content: str) -> str: """Adds embedded audio for mp3/ogg/opus """ - if not ('.mp3' in content or '.ogg' in content or '.opus' in content): + if not ('.mp3' in content or + '.ogg' in content or + '.opus' in content or + '.flac' in content): return content if '