Fixing issue downloading songs
This commit is contained in:
parent
4955a806fa
commit
06cc7056d0
|
@ -20,5 +20,6 @@ dependencies:
|
||||||
- "/home/ubuntu/.go_workspace/src/github.com/nitrous-io"
|
- "/home/ubuntu/.go_workspace/src/github.com/nitrous-io"
|
||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
|
- youtube-dl --output ~/.mumbledj/songs/QcIy9NiNbmo.m4a --format m4a http://www.youtube.com/watch?v=QcIy9NiNbmo
|
||||||
- mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=circleci -password=$MUMBLE_PASSWORD -verbose=true -test=true:
|
- mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=circleci -password=$MUMBLE_PASSWORD -verbose=true -test=true:
|
||||||
timeout: 180
|
timeout: 180
|
|
@ -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(`~/.mumbledj/songs/%s`, dl.Filename()), "--format", "m4a", dl.url)
|
cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", dl.url)
|
||||||
err = cmd.Run()
|
err = cmd.Run()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if dj.conf.Cache.Enabled {
|
if dj.conf.Cache.Enabled {
|
||||||
|
|
Reference in a new issue