Fixing build issues

This commit is contained in:
MichaelOultram 2015-07-28 00:13:13 +01:00
parent eb454af34f
commit c64ce68e85

View file

@ -64,7 +64,7 @@ func RegexpFromURL(url string, patterns []string) *regexp.Regexp {
// Creates the requested song/playlist and adds to the queue // Creates the requested song/playlist and adds to the queue
func (y YouTube) NewRequest(user *gumble.User, url string) error { func (y YouTube) NewRequest(user *gumble.User, url string) error {
var shortURL, startOffset = "" var shortURL, startOffset = "", ""
if re, err := regexp.Compile(youtubePlaylistPattern); err == nil { if re, err := regexp.Compile(youtubePlaylistPattern); err == nil {
if re.MatchString(url) { if re.MatchString(url) {
if dj.HasPermission(user.Name, dj.conf.Permissions.AdminAddPlaylists) { if dj.HasPermission(user.Name, dj.conf.Permissions.AdminAddPlaylists) {
@ -81,7 +81,8 @@ func (y YouTube) NewRequest(user *gumble.User, url string) error {
if len(matches[0]) == 3 { if len(matches[0]) == 3 {
startOffset = matches[0][2] startOffset = matches[0][2]
} }
NewYouTubeSong(user.Name, shortURL, startOffset, nil) _, err := NewYouTubeSong(user.Name, shortURL, startOffset, nil)
return err
} }
} else { } else {
return err return err