Fixing build issues
This commit is contained in:
parent
06ce580d27
commit
eb8afc4404
|
@ -9,6 +9,7 @@ package main
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/layeh/gumble/gumble"
|
||||
)
|
||||
|
@ -64,7 +65,7 @@ func findServiceAndAdd(user *gumble.User, url string) error {
|
|||
}
|
||||
|
||||
if urlService == nil {
|
||||
return "", errors.New("INVALID_URL")
|
||||
return errors.New("INVALID_URL")
|
||||
} else {
|
||||
oldLength := dj.queue.Len()
|
||||
var title string
|
||||
|
@ -80,7 +81,7 @@ func findServiceAndAdd(user *gumble.User, url string) error {
|
|||
} else {
|
||||
dj.queue.CurrentSong().Delete()
|
||||
dj.queue.OnSongFinished()
|
||||
return "", errors.New("FAILED_TO_DOWNLOAD")
|
||||
return errors.New("FAILED_TO_DOWNLOAD")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
10
web.go
10
web.go
|
@ -36,7 +36,7 @@ func Webserver(port int) *WebServer {
|
|||
return &webserver
|
||||
}
|
||||
|
||||
func (w WebServer) homepage(w http.ResponseWriter, r *http.Request) {
|
||||
func (web WebServer) homepage(w http.ResponseWriter, r *http.Request) {
|
||||
var uname = token_client[r.URL.Path[1:]]
|
||||
if uname == nil {
|
||||
fmt.Fprintf(w, "Invalid Token")
|
||||
|
@ -46,7 +46,7 @@ func (w WebServer) homepage(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
func (w WebServer) add(w http.ResponseWriter, r *http.Request) {
|
||||
func (web WebServer) add(w http.ResponseWriter, r *http.Request) {
|
||||
var uname = token_client[r.FormValue("token")]
|
||||
if uname == nil {
|
||||
fmt.Fprintf(w, "Invalid Token")
|
||||
|
@ -55,7 +55,7 @@ func (w WebServer) add(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
func (w WebServer) volume(w http.ResponseWriter, r *http.Request) {
|
||||
func (web WebServer) volume(w http.ResponseWriter, r *http.Request) {
|
||||
var uname = token_client[r.FormValue("token")]
|
||||
if uname == nil {
|
||||
fmt.Fprintf(w, "Invalid Token")
|
||||
|
@ -65,7 +65,7 @@ func (w WebServer) volume(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
func (w WebServer) skip(w http.ResponseWriter, r *http.Request) {
|
||||
func (web WebServer) skip(w http.ResponseWriter, r *http.Request) {
|
||||
var uname = token_client[r.FormValue("token")]
|
||||
if uname == nil {
|
||||
fmt.Fprintf(w, "Invalid Token")
|
||||
|
@ -75,7 +75,7 @@ func (w WebServer) skip(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
func (w WebServer) GetWebAddress(user *gumble.User) {
|
||||
func (web WebServer) GetWebAddress(user *gumble.User) {
|
||||
if client_token[user] != "" {
|
||||
token_client[client_token[user]] = nil
|
||||
}
|
||||
|
|
Reference in a new issue