refactor: change output file name

This commit is contained in:
Mathis Maquenne
2024-10-14 16:22:44 +02:00
parent 38fd68a471
commit 68f0b5c3e4
+1 -1
View File
@@ -93,7 +93,7 @@ var downloadCmd = &cobra.Command{
ext = "flac" ext = "flac"
} }
filePath := path.Join(output, fmt.Sprintf("%s - %s.%s", strings.Join(song.Contributors.MainArtists, ", "), songTitle, ext)) filePath := path.Join(output, fmt.Sprintf("%s. %s - %s.%s", song.TrackNumber, songTitle, strings.Join(song.Contributors.MainArtists, ", "), ext))
err = media.Download(url, filePath, song.ID) err = media.Download(url, filePath, song.ID)
if err != nil { if err != nil {
fmt.Printf("\r Downloading %s... FAILED\n", songTitle) fmt.Printf("\r Downloading %s... FAILED\n", songTitle)