pull/157/merge v3.1.4
Matthieu Grieger 2016-08-22 20:20:41 -07:00
parent 9222608962
commit 51db9c3061
3 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,10 @@
MumbleDJ Changelog
==================
### August 22, 2016 -- `v3.1.4`
* Fixed a SoundCloud API response parsing issue that would result in empty IDs for tracks.
* Fixed the startup check for SoundCloud API.
### August 21, 2016 -- `v3.1.3`
* Fixed a deadlock that would occur during the transition from the first to second track in a queue.

View File

@ -32,7 +32,7 @@ func init() {
services.DJ = DJ
bot.DJ = DJ
DJ.Version = "v3.1.3"
DJ.Version = "v3.1.4"
logrus.SetLevel(logrus.WarnLevel)
}

View File

@ -52,7 +52,7 @@ func (sc *SoundCloud) CheckAPIKey() error {
if viper.GetString("api_keys.soundcloud") == "" {
return errors.New("No SoundCloud API key has been provided")
}
url := "http://api.soundcloud.com/tracks/vjflzpbkmerb?client_id=%s"
url := "http://api.soundcloud.com/tracks/13158665?client_id=%s"
response, err := http.Get(fmt.Sprintf(url, viper.GetString("api_keys.soundcloud")))
defer response.Body.Close()
if err != nil {
@ -162,7 +162,8 @@ func (sc *SoundCloud) GetTracks(url string, submitter *gumble.User) ([]interface
func (sc *SoundCloud) getTrack(obj *jason.Object, offset time.Duration, submitter *gumble.User) (bot.Track, error) {
title, _ := obj.GetString("title")
id, _ := obj.GetString("id")
idInt, _ := obj.GetInt64("id")
id := strconv.FormatInt(idInt, 10)
url, _ := obj.GetString("permalink_url")
author, _ := obj.GetString("user", "username")
authorURL, _ := obj.GetString("user", "permalink_url")