diff --git a/Makefile b/Makefile index 2f0b5c3..92851ce 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: mumbledj mumbledj: main.go commands.go parseconfig.go strings.go service.go service_youtube.go songqueue.go cache.go web.go - go get github.com/nitrous-io/goop + if [! -f $GOPATH/bin/goop ]; then go get github.com/nitrous-io/goop; fi; rm -rf Goopfile.lock goop install goop go build diff --git a/web.go b/web.go index 1fb2c40..73d7c23 100644 --- a/web.go +++ b/web.go @@ -75,7 +75,7 @@ func (web *WebServer) homepage(w http.ResponseWriter, r *http.Request) { webpage = "index" } - t, err := template.ParseFiles(fmt.Sprintf("%s/.mumbledj/songs/%s.html", dj.homeDir, uname.Name)) + t, err := template.ParseFiles(fmt.Sprintf("%s/.mumbledj/songs/%s.html", dj.homeDir, webpage)) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return