mirror of
https://github.com/navidrome/navidrome.git
synced 2024-09-11 20:12:54 +02:00
22 lines
517 B
Go
22 lines
517 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type ScrobbleEntry struct {
|
|
MediaFile
|
|
Service string
|
|
UserID string `json:"user_id" orm:"column(user_id)"`
|
|
PlayTime time.Time
|
|
EnqueueTime time.Time
|
|
}
|
|
|
|
type ScrobbleEntries []ScrobbleEntry
|
|
|
|
type ScrobbleBufferRepository interface {
|
|
UserIDs(service string) ([]string, error)
|
|
Enqueue(service, userId, mediaFileId string, playTime time.Time) error
|
|
Next(service string, userId string) (*ScrobbleEntry, error)
|
|
Dequeue(entry *ScrobbleEntry) error
|
|
Length() (int64, error)
|
|
}
|