Fixed check for error in youtube link
This commit is contained in:
parent
b7c6ecbf35
commit
508afd963a
|
@ -96,7 +96,11 @@ func (yt YouTube) NewRequest(user *gumble.User, url string) (string, error) {
|
||||||
startOffset = matches[0][2]
|
startOffset = matches[0][2]
|
||||||
}
|
}
|
||||||
song, err := yt.NewSong(user.Name, shortURL, startOffset, nil)
|
song, err := yt.NewSong(user.Name, shortURL, startOffset, nil)
|
||||||
|
if !isNil(song) {
|
||||||
return song.Title(), err
|
return song.Title(), err
|
||||||
|
} else {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "", err
|
return "", err
|
||||||
|
|
Reference in a new issue