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 -4
View File
@@ -3,7 +3,6 @@ package engine
import (
"context"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/model"
"github.com/deluan/navidrome/utils"
)
@@ -52,12 +51,11 @@ func (p *playlists) Create(ctx context.Context, playlistId, name string, ids []s
}
func (p *playlists) getUser(ctx context.Context) string {
owner := consts.InitialUserName
user, ok := ctx.Value("user").(*model.User)
if ok {
owner = user.UserName
return user.UserName
}
return owner
return ""
}
func (p *playlists) Delete(ctx context.Context, playlistId string) error {