Add log statement when downloading with youtube-dl

pull/188/head
RichardNysater 2017-06-04 02:21:30 +02:00
parent 1b921d69b2
commit b6d8ec7510
1 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,12 @@ func (yt *YouTubeDL) Download(t interfaces.Track) error {
// Check to see if track is already downloaded.
if _, err := os.Stat(filepath); os.IsNotExist(err) {
var cmd *exec.Cmd
logrus.WithFields(logrus.Fields{
"url": t.GetURL(),
"target filepath": filepath,
"format" : format,
"player" : player,
}).Infoln("Downloading song...")
if t.GetService() == "Mixcloud" {
cmd = exec.Command("youtube-dl", "--verbose", "--no-mtime", "--output", filepath, "--format", format, "--external-downloader", "aria2c", player, t.GetURL())
} else {