more cleaning logics
This commit is contained in:
parent
de628f4911
commit
20245c109b
4 changed files with 28 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue