more cleaning logics

This commit is contained in:
stefanodvx 2025-04-15 21:32:56 +02:00
parent de628f4911
commit 20245c109b
4 changed files with 28 additions and 1 deletions

View file

@ -110,3 +110,11 @@ func CheckFFmpeg() bool {
_, err := exec.LookPath("ffmpeg")
return err == nil
}
func ClearDownlods() {
downloadsDir := os.Getenv("DOWNLOADS_DIR")
if downloadsDir == "" {
downloadsDir = "downloads"
}
os.RemoveAll(downloadsDir)
}