mirror of
https://github.com/navidrome/navidrome.git
synced 2025-05-06 21:31:07 +03:00
20 lines
409 B
Go
20 lines
409 B
Go
package engine
|
|
|
|
import "time"
|
|
|
|
const NowPlayingExpire = time.Duration(60) * time.Minute
|
|
|
|
type NowPlayingInfo struct {
|
|
TrackId string
|
|
Start time.Time
|
|
Username string
|
|
PlayerId int
|
|
PlayerName string
|
|
}
|
|
|
|
type NowPlayingRepository interface {
|
|
Set(trackId, username string, playerId int, playerName string) error
|
|
Clear(playerId int) (*NowPlayingInfo, error)
|
|
GetAll() (*[]NowPlayingInfo, error)
|
|
}
|