diff options
author | Franck Cuny <franck@fcuny.net> | 2022-01-21 10:11:10 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-06-11 14:32:09 -0700 |
commit | a63dc3d875f00080c43074b6e0328064a6fce22c (patch) | |
tree | 28a9b829fc9274e7fc4d5481f3ae1297d7bb0bd4 /tools/mpd-stats/internal/scrobbler | |
parent | doc: update README with instruction for installing (diff) | |
download | world-a63dc3d875f00080c43074b6e0328064a6fce22c.tar.gz |
mpd: we only want events from the player subsystem
Store the name of the subsystem in a constant, add some comments on where to find the list.
Diffstat (limited to 'tools/mpd-stats/internal/scrobbler')
-rw-r--r-- | tools/mpd-stats/internal/scrobbler/scrobbler.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mpd-stats/internal/scrobbler/scrobbler.go b/tools/mpd-stats/internal/scrobbler/scrobbler.go index f0f9d0e..eb4eb9c 100644 --- a/tools/mpd-stats/internal/scrobbler/scrobbler.go +++ b/tools/mpd-stats/internal/scrobbler/scrobbler.go @@ -44,7 +44,7 @@ func (s *Scrobbler) Run() error { for { e := <-s.player.Watcher.Event - if e != "" { + if e == mpd.SubSystemPlayer { status, err := s.player.Client.Status() if err != nil { log.Printf("could not read the status: %v", err) |