diff --git a/modules/organizer.py b/modules/organizer.py index 2b140c5..6fd2081 100644 --- a/modules/organizer.py +++ b/modules/organizer.py @@ -15,6 +15,8 @@ def categorizar_por_tipo(ficheiro: str) -> str: str -> tipo de ficheiro """ # TODO: extensões configuraveis externamente pelo utilizador + # ficheiro configuração: uniq.toml + # carregar categorias e tipos de ficheiro da tabela 'tipos_ficheiros' extensao = Path(ficheiro).suffix.lower() if extensao in [".jpeg", ".jpg", ".bmp", ".cr2", ".raw"]: return "imagem" @@ -22,6 +24,8 @@ def categorizar_por_tipo(ficheiro: str) -> str: return "documento" elif extensao in [".mp4", ".mpeg", ".mov"]: return "video" + elif extensao in [".mp3", "wav", ".aac"]: + return "audio" else: return "outros"