Fixing build issues

This commit is contained in:
MichaelOultram 2015-07-27 22:34:35 +01:00
parent 7ce5572d9c
commit 3f9613e0f3
2 changed files with 8 additions and 8 deletions

View file

@ -48,7 +48,3 @@ type Playlist interface {
ID() string ID() string
Title() string Title() string
} }
var services = []Service{
new(*YoutubeService),
}

View file

@ -29,16 +29,20 @@ import (
// YOUTUBE SERVICE // YOUTUBE SERVICE
// --------------- // ---------------
type YouTubeService struct { var services = []Service{
Youtube{},
}
type YouTube struct {
} }
// Name of the service // Name of the service
func (yt YoutubeService) 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 (yt YoutubeService) 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 +66,7 @@ func (yt YoutubeService) 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 (yt YoutubeService) NewRequest(user *gumble.User, url string) { func (y Youtube) NewRequest(user *gumble.User, url string) {
} }