Use video.Filename

This commit is contained in:
Andrea Fazzi 2021-11-03 16:13:33 +01:00
parent 9f3cf93538
commit 55d95b1e58

View file

@ -32,7 +32,7 @@ func (d *YoutubeDlDownloader) StartDownload(video *youtube.Video, tasks task.Tas
}
log.Printf("Download of video ID %s STARTED.", video.ID)
cmd := exec.CommandContext(context.Background(), d.CommandName, "-o", filepath.Join("data/", video.ID), "--newline", d.Url)
cmd := exec.CommandContext(context.Background(), d.CommandName, "-o", filepath.Join("data/", video.Filename), "--newline", d.Url)
stdout, err := cmd.StdoutPipe()
if err != nil {
panic(err)