From fb9f9cc418787b1f9acf8d745b6635e30c3a0311 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Tue, 28 Jul 2015 21:40:44 +0100 Subject: [PATCH] Fixing build issues --- service.go | 9 ++++++--- web.go | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/service.go b/service.go index 7c67733..551fc28 100644 --- a/service.go +++ b/service.go @@ -8,7 +8,8 @@ package main import ( - "fmt" + "errors" + "github.com/layeh/gumble/gumble" ) @@ -63,9 +64,11 @@ func findServiceAndAdd(user *gumble.User, url string) (string, error) { } if urlService == nil { - return nil, errors.New("INVALID_URL") + return "", errors.New("INVALID_URL") } else { oldLength := dj.queue.Len() + var title string + var err error if title, err := urlService.NewRequest(user, url); err == nil { // Starts playing the new song if nothing else is playing @@ -75,7 +78,7 @@ func findServiceAndAdd(user *gumble.User, url string) (string, error) { } else { dj.queue.CurrentSong().Delete() dj.queue.OnSongFinished() - return nil, errors.New("FAILED_TO_DOWNLOAD") + return "", errors.New("FAILED_TO_DOWNLOAD") } } } diff --git a/web.go b/web.go index b513255..cc392b2 100644 --- a/web.go +++ b/web.go @@ -5,7 +5,6 @@ import ( "io/ioutil" "math/rand" "net/http" - "html" "strings" "time" @@ -38,7 +37,7 @@ func addSong(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Invalid Token") } else { var url = UnescapeString(r.FormValue("url")) - + } }