From 6ef0f7f5bca4971bed07510438fedcb4c60792de Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Thu, 13 Aug 2015 14:26:39 +0100 Subject: [PATCH] Getting soundcloud to work [ci skip] --- service_soundcloud.go | 4 ++-- youtube_dl.go | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/service_soundcloud.go b/service_soundcloud.go index 5b423d6..8f26bd8 100644 --- a/service_soundcloud.go +++ b/service_soundcloud.go @@ -79,7 +79,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, play if err != nil { return "", err } - id, err := trackData.String("id") + id, err := trackData.Int("id") if err != nil { return "", err } @@ -97,7 +97,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, play } song := &YouTubeDLSong{ - id: id, + id: string(id), title: title, url: url, thumbnail: thumbnail, diff --git a/youtube_dl.go b/youtube_dl.go index 2170123..b9053b9 100644 --- a/youtube_dl.go +++ b/youtube_dl.go @@ -48,11 +48,13 @@ func (dl *YouTubeDLSong) Download() error { } return nil } else { - Verbose("youtube-dl: " + err.Error()) + args := "youtube-dl " for s := range cmd.Args { - Verbose("youtube-dl args: " + cmd.Args[s]) + args += cmd.Args[s] } + Verbose(args) Verbose(string(output)) + Verbose("youtube-dl: " + err.Error()) return errors.New("Song download failed.") } }