feat: add server name and version to all responses

This is inline with other Subsonic compatible servers, like funkwhale, madsonic, ampache...
This commit is contained in:
Deluan
2020-01-30 14:43:24 -05:00
parent 482350c076
commit 90a1e6d213
47 changed files with 76 additions and 71 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"strings"
"time"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/engine"
"github.com/deluan/navidrome/model"
"github.com/deluan/navidrome/server/subsonic/responses"
@@ -14,7 +15,7 @@ import (
)
func NewResponse() *responses.Subsonic {
return &responses.Subsonic{Status: "ok", Version: Version}
return &responses.Subsonic{Status: "ok", Version: Version, Type: consts.AppName, ServerVersion: consts.Version()}
}
func RequiredParamString(r *http.Request, param string, msg string) (string, error) {