From cc32db2688f8d7a07d44febc2a22e2011209cc3e Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Wed, 12 Aug 2015 22:29:46 +0100 Subject: [PATCH] Fixing issue downloading songs --- circle.yml | 2 +- youtube_dl.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 6051378..4c2b6c4 100644 --- a/circle.yml +++ b/circle.yml @@ -20,6 +20,6 @@ dependencies: - "/home/ubuntu/.go_workspace/src/github.com/nitrous-io" test: override: - - youtube-dl --output ~/.mumbledj/songs/QcIy9NiNbmo.m4a --format m4a http://www.youtube.com/watch?v=QcIy9NiNbmo + - youtube-dl --output ~/.mumbledj/songs/QcIy9NiNbmo.m4a --format m4a --prefer-ffmpeg http://www.youtube.com/watch?v=QcIy9NiNbmo - mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=circleci -password=$MUMBLE_PASSWORD -verbose=true -test=true: timeout: 180 \ No newline at end of file diff --git a/youtube_dl.go b/youtube_dl.go index 57c6957..83a120c 100644 --- a/youtube_dl.go +++ b/youtube_dl.go @@ -39,7 +39,7 @@ func (dl *YouTubeDLSong) Download() error { // 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) { - cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", dl.url) + cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", "--prefer-ffmpeg", dl.url) err = cmd.Run() if err == nil { if dj.conf.Cache.Enabled {