newgiin / cloudplayer-scrobbler

Chrome plugin for scrobbling from Google Play (music.google.com)
52 stars 15 forks source link

Too many now playing requests #38

Closed tims closed 7 years ago

tims commented 7 years ago

This extension is sending "now playing" requests in every loop. (I checked with tcpdump).

This is unnecessary, but I also have seen it cause problems for me on slow or bad networks.

The scrobbling api specifies you only need to send it when you start the track. If you send the track duration you'll ensure it stays active accurately.

Sending it continuously without a duration will just reset the timeout for the current track to the default each time (which I think is five minutes).

So if you stop playing the track will linger around longer than it should.

The track duration in seconds is available so it should be easy to do it properly. I will make a pull request.