Fixing build issues
This commit is contained in:
parent
4cfb1c19f9
commit
8604bae69c
3
main.go
3
main.go
|
@ -148,14 +148,11 @@ var dj = mumbledj{
|
||||||
cache: NewSongCache(),
|
cache: NewSongCache(),
|
||||||
}
|
}
|
||||||
|
|
||||||
var services []Service
|
|
||||||
|
|
||||||
// main primarily performs startup tasks. Grabs and parses commandline
|
// main primarily performs startup tasks. Grabs and parses commandline
|
||||||
// args, sets up the gumble client and its listeners, and then connects to the server.
|
// args, sets up the gumble client and its listeners, and then connects to the server.
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
PerformStartupChecks()
|
PerformStartupChecks()
|
||||||
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
|
||||||
|
|
|
@ -48,3 +48,5 @@ type Playlist interface {
|
||||||
ID() string
|
ID() string
|
||||||
Title() string
|
Title() string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var services = []Service{YouTube{}}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue