Fixing build issues

This commit is contained in:
MichaelOultram 2015-07-27 22:46:13 +01:00
parent 578a4eb626
commit f50c1b9d1b
2 changed files with 4 additions and 4 deletions

View file

@ -155,7 +155,7 @@ var services []*Service
func main() { func main() {
PerformStartupChecks() PerformStartupChecks()
services = []*Service{Youtube{}} services = []Service{new(Youtube)}
if currentUser, err := user.Current(); err == nil { if currentUser, err := user.Current(); err == nil {
dj.homeDir = currentUser.HomeDir dj.homeDir = currentUser.HomeDir

View file

@ -33,12 +33,12 @@ type YouTube struct {
} }
// Name of the service // Name of the service
func (y Youtube) ServiceName() string { func (y *Youtube) ServiceName() string {
return "Youtube" return "Youtube"
} }
// Checks to see if service will accept URL // Checks to see if service will accept URL
func (y Youtube) URLRegex(url string) bool { func (y *Youtube) URLRegex(url string) bool {
youtubePatterns := []string{ youtubePatterns := []string{
`https?:\/\/www\.youtube\.com\/watch\?v=([\w-]+)(\&t=\d*m?\d*s?)?`, `https?:\/\/www\.youtube\.com\/watch\?v=([\w-]+)(\&t=\d*m?\d*s?)?`,
`https?:\/\/youtube\.com\/watch\?v=([\w-]+)(\&t=\d*m?\d*s?)?`, `https?:\/\/youtube\.com\/watch\?v=([\w-]+)(\&t=\d*m?\d*s?)?`,
@ -62,7 +62,7 @@ func (y Youtube) URLRegex(url string) bool {
} }
// 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) { func (y *Youtube) NewRequest(user *gumble.User, url string) {
} }