Fixing issue with youtube-dl and ffmpeg

This commit is contained in:
MichaelOultram 2015-08-12 22:46:09 +01:00
parent 9d80bcd1f6
commit 82f00aaf13
2 changed files with 2 additions and 1 deletions

View file

@ -80,5 +80,6 @@ func (t TestSettings) testYoutubeSong() {
skip(dummyUser, false, false) skip(dummyUser, false, false)
} }
os.Exit(0)
//dummyClient.Disconnect() //dummyClient.Disconnect()
} }

View file

@ -39,7 +39,7 @@ func (dl *YouTubeDLSong) Download() error {
// Checks to see if song is already downloaded // Checks to see if song is already downloaded
if _, err := os.Stat(fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename())); os.IsNotExist(err) { if _, err := os.Stat(fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename())); os.IsNotExist(err) {
cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", "--prefer-ffmpeg", dl.url) cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", "--prefer-ffmpeg", "--", dl.ID())
err = cmd.Run() err = cmd.Run()
if err == nil { if err == nil {
if dj.conf.Cache.Enabled { if dj.conf.Cache.Enabled {