Getting soundcloud to work [ci skip]
This commit is contained in:
parent
04fc569a9b
commit
6ef0f7f5bc
|
@ -79,7 +79,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, play
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
id, err := trackData.String("id")
|
id, err := trackData.Int("id")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, play
|
||||||
}
|
}
|
||||||
|
|
||||||
song := &YouTubeDLSong{
|
song := &YouTubeDLSong{
|
||||||
id: id,
|
id: string(id),
|
||||||
title: title,
|
title: title,
|
||||||
url: url,
|
url: url,
|
||||||
thumbnail: thumbnail,
|
thumbnail: thumbnail,
|
||||||
|
|
|
@ -48,11 +48,13 @@ func (dl *YouTubeDLSong) Download() error {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
Verbose("youtube-dl: " + err.Error())
|
args := "youtube-dl "
|
||||||
for s := range cmd.Args {
|
for s := range cmd.Args {
|
||||||
Verbose("youtube-dl args: " + cmd.Args[s])
|
args += cmd.Args[s]
|
||||||
}
|
}
|
||||||
|
Verbose(args)
|
||||||
Verbose(string(output))
|
Verbose(string(output))
|
||||||
|
Verbose("youtube-dl: " + err.Error())
|
||||||
return errors.New("Song download failed.")
|
return errors.New("Song download failed.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue