forked from DRMTalks/devine
Add FLAC to the Audio Codecs enum and relevant methods
This commit is contained in:
parent
e3941e4640
commit
1c5099440b
|
@ -16,6 +16,7 @@ class Audio(Track):
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue