From 1c5099440b01bbeb4a461e3cbf1c80a40ea96dc1 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Mon, 1 May 2023 18:49:25 +0100 Subject: [PATCH] Add FLAC to the Audio Codecs enum and relevant methods --- devine/core/tracks/audio.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devine/core/tracks/audio.py b/devine/core/tracks/audio.py index 0eaa95b..be13d1b 100644 --- a/devine/core/tracks/audio.py +++ b/devine/core/tracks/audio.py @@ -13,9 +13,10 @@ class Audio(Track): AC3 = "DD" # https://wikipedia.org/wiki/Dolby_Digital EC3 = "DD+" # https://wikipedia.org/wiki/Dolby_Digital_Plus OPUS = "OPUS" # https://wikipedia.org/wiki/Opus_(audio_format) - OGG = "VORB" # https://wikipedia.org/wiki/Vorbis - DTS = "DTS" # https://en.wikipedia.org/wiki/DTS_(company)#DTS_Digital_Surround + OGG = "VORB" # https://wikipedia.org/wiki/Vorbis + DTS = "DTS" # https://en.wikipedia.org/wiki/DTS_(company)#DTS_Digital_Surround ALAC = "ALAC" # https://en.wikipedia.org/wiki/Apple_Lossless_Audio_Codec + FLAC = "FLAC" # https://en.wikipedia.org/wiki/FLAC @property def extension(self) -> str: @@ -36,6 +37,8 @@ class Audio(Track): return Audio.Codec.DTS if mime == "alac": return Audio.Codec.ALAC + if mime == "flac": + return Audio.Codec.FLAC raise ValueError(f"The MIME '{mime}' is not a supported Audio Codec") @staticmethod