mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-14 19:20:37 +03:00
Fix log message
This commit is contained in:
parent
9f1794b97e
commit
a1866c7ff3
@ -38,7 +38,7 @@ func (p *players) Register(ctx context.Context, id, client, userAgent, ip string
|
|||||||
if err != nil || id == "" {
|
if err != nil || id == "" {
|
||||||
plr, err = p.ds.Player(ctx).FindMatch(user.ID, client, userAgent)
|
plr, err = p.ds.Player(ctx).FindMatch(user.ID, client, userAgent)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
log.Debug(ctx, "Found matching player", "id", plr.ID, "client", client, "username", userName, "type", userAgent)
|
log.Debug(ctx, "Found matching player", "id", plr.ID, "client", client, "username", userName(ctx), "type", userAgent)
|
||||||
} else {
|
} else {
|
||||||
plr = &model.Player{
|
plr = &model.Player{
|
||||||
ID: uuid.NewString(),
|
ID: uuid.NewString(),
|
||||||
@ -46,7 +46,7 @@ func (p *players) Register(ctx context.Context, id, client, userAgent, ip string
|
|||||||
Client: client,
|
Client: client,
|
||||||
ScrobbleEnabled: true,
|
ScrobbleEnabled: true,
|
||||||
}
|
}
|
||||||
log.Info(ctx, "Registering new player", "id", plr.ID, "client", client, "username", userName, "type", userAgent)
|
log.Info(ctx, "Registering new player", "id", plr.ID, "client", client, "username", userName(ctx), "type", userAgent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plr.Name = fmt.Sprintf("%s [%s]", client, userAgent)
|
plr.Name = fmt.Sprintf("%s [%s]", client, userAgent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user