feat: add album handler
Serves a page including the album name, artist, track list, and credits. Each of the tracks have links to the lyrics page, provided there is one available.
This commit is contained in:
1
main.go
1
main.go
@ -31,6 +31,7 @@ func main() {
|
||||
r.HandleFunc("/{id}-lyrics", lyricsHandler)
|
||||
r.HandleFunc("/images/{filename}.{ext}", proxyHandler)
|
||||
r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
||||
r.HandleFunc("/albums/{artist}/{albumName}", albumHandler)
|
||||
r.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
render("error", w, map[string]string{
|
||||
|
Reference in New Issue
Block a user