mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-07 06:27:36 +03:00
Logs new stream sessions
This commit is contained in:
parent
a17a98a75f
commit
647132625c
2 changed files with 18 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
package engine
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
|
@ -153,3 +154,12 @@ func FromArtists(ars model.Artists) Entries {
|
|||
}
|
||||
return entries
|
||||
}
|
||||
|
||||
func userName(ctx context.Context) string {
|
||||
user := ctx.Value("user")
|
||||
if user == nil {
|
||||
return "UNKNOWN"
|
||||
}
|
||||
usr := user.(model.User)
|
||||
return usr.UserName
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue