gix / foo_scrobble

foobar2000 component for last.fm scrobbling
MIT License
428 stars 12 forks source link

Now Playing is expires after a time (10 minutes?) and is not sent again #26

Open rzumer opened 3 years ago

rzumer commented 3 years ago

When listening to long tracks the Now Playing status is lost after a set amount of time, probably a timeout on last.fm's end, somewhere around the 10 minute mark as far as I can tell. foo_scrobble should send the status again at regular intervals to maintain the status in that case as long as the track is still playing.

rzumer commented 3 years ago

I played a long track today that did not clear its now playing state, so it is possible it is dependent on the track somehow... the only difference that I can think of is that the track that stopped broadcasting its "now playing" status was redirected to a different name (and my account has redirects disabled).

gix commented 3 years ago

Probably something on last.fm's side. There isn't really any sophisticated logic in foo_scrobble for the notification. Once a new track starts playing (new file, or new dynamic track info, both as reported by foobar) and 3 seconds of listen time have accumulated, the notification is sent once. The sent state is cleared when another track starts or playback is stopped.

Before anything, this should be investigated further. There is also an optional duration value for the notification which is currently not sent to last.fm. Maybe this can help with longer tracks.