feat(subsonic): update track play stats on scrobble instead of stream
This commit is contained in:
22
scrobble/scrobble.go
Normal file
22
scrobble/scrobble.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package scrobble
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"go.senan.xyz/gonic/db"
|
||||
)
|
||||
|
||||
type Track struct {
|
||||
Track string
|
||||
Artist string
|
||||
Album string
|
||||
AlbumArtist string
|
||||
TrackNumber uint
|
||||
Duration time.Duration
|
||||
MusicBrainzID string
|
||||
}
|
||||
|
||||
type Scrobbler interface {
|
||||
IsUserAuthenticated(user db.User) bool
|
||||
Scrobble(user db.User, track Track, stamp time.Time, submission bool) error
|
||||
}
|
||||
Reference in New Issue
Block a user