From 932b64f124d9cb725f14e7601bfbac0f4621ade1 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Tue, 3 Mar 2026 18:28:28 -0300 Subject: [PATCH] Add actual_file_format property to AudioQuality --- votify/interface/enums.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/votify/interface/enums.py b/votify/interface/enums.py index 615a773..457e5fc 100644 --- a/votify/interface/enums.py +++ b/votify/interface/enums.py @@ -68,8 +68,16 @@ class AudioQuality(Enum): return "mp4" elif self.value in VORBIS_AUDIO_QUALITIES: return "ogg" - elif self.value == "flac": + return None + + @property + def actual_file_format(self) -> str | None: + if self.value == "flac": return "flac" + elif self.value in MP4_AUDIO_QUALITIES: + return "m4a" + elif self.value in VORBIS_AUDIO_QUALITIES: + return "ogg" return None @property