Fixing build errors
This commit is contained in:
parent
46d7217fa1
commit
a5fe8960f2
1
main.go
1
main.go
|
@ -14,7 +14,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
"reflect"
|
"reflect"
|
||||||
"regexp"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"regexp"
|
||||||
|
|
||||||
"github.com/layeh/gumble/gumble"
|
"github.com/layeh/gumble/gumble"
|
||||||
)
|
)
|
||||||
|
|
|
@ -66,7 +66,7 @@ func (sc SoundCloud) NewRequest(user *gumble.User, url string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSong creates a track and adds to the queue
|
// NewSong creates a track and adds to the queue
|
||||||
func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, playlist Playlist) (Song, error) {
|
func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, playlist Playlist) (string, error) {
|
||||||
title, _ := trackData.String("title")
|
title, _ := trackData.String("title")
|
||||||
id, _ := trackData.Int("id")
|
id, _ := trackData.Int("id")
|
||||||
duration, _ := trackData.Int("duration")
|
duration, _ := trackData.Int("duration")
|
||||||
|
@ -94,5 +94,5 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, play
|
||||||
dj.queue.AddSong(song)
|
dj.queue.AddSong(song)
|
||||||
return song, nil
|
return song, nil
|
||||||
}
|
}
|
||||||
return nil, errors.New(VIDEO_TOO_LONG_MSG)
|
return "", errors.New(VIDEO_TOO_LONG_MSG)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue