add param parsing methods

related: #41
This commit is contained in:
sentriz
2020-06-06 18:13:45 +01:00
committed by Senan Kelly
parent 07e1c53d69
commit 4f519d71ed
5 changed files with 294 additions and 52 deletions

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
Find(&childTracks)
for _, c := range childTracks {
toAppend := spec.NewTCTrackByFolder(c, folder)
if params.Get("c") == "Jamstash" {
if v, _ := params.Get("c"); v == "Jamstash" {
// jamstash thinks it can't play flacs
toAppend.ContentType = "audio/mpeg"
toAppend.Suffix = "mp3"