From ce79a30b8dea2a0e384b6474bf3db8172aa3482f Mon Sep 17 00:00:00 2001 From: Luis Rodrigues Date: Mon, 21 Apr 2025 11:35:54 +0100 Subject: [PATCH] adicionado nova categoria de ficheiros: 'audio' --- modules/organizer.py | 4 ++++ 1 file changed, 4 insertions(+) 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"