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:
+2
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user