From 46e2a87e76182f03d041d2651441b95dfd0906de Mon Sep 17 00:00:00 2001 From: Chigozirim Igweamaka Date: Sat, 29 Jun 2024 22:58:17 +0100 Subject: [PATCH] Delete .m4a song file once done using it. --- spotify/downloader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spotify/downloader.go b/spotify/downloader.go index aa7fb8a..8bac30c 100644 --- a/spotify/downloader.go +++ b/spotify/downloader.go @@ -146,8 +146,9 @@ func dlTrack(tracks []Track, path string) (int, error) { return } + DeleteFile(filepath.Join(path, fileName+".m4a")) + if DELETE_SONG_FILE { - DeleteFile(filepath.Join(path, fileName+".m4a")) DeleteFile(filepath.Join(path, fileName+".wav")) }