navidrome/engine/nowplaying.go

20 lines
409 B
Go
Raw Normal View History

package engine
import "time"
2016-03-17 22:35:10 +01:00
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
2016-03-17 23:58:09 +01:00
Clear(playerId int) (*NowPlayingInfo, error)
GetAll() (*[]NowPlayingInfo, error)
}