blueflag / HipFM

Post "now playing" track from last.fm to HipChat room
MIT License
2 stars 3 forks source link

Sending notifications #2

Open ghost opened 9 years ago

ghost commented 9 years ago

Current situation:

Notifications to HipChat is sent whenever you change the track or also in other inconvenient situations like pausing, playing etc.

Desired situation:

Notifications should be only sent when the scrobble is formally accepted according to documentation:

When is a scrobble a scrobble?
A track should only be scrobbled when the following conditions have been met:

The track must be longer than 30 seconds.
And the track has been played for at least half its duration, or for 4 minutes (whichever occurs earlier.)
As soon as these conditions have been met, the scrobble request may be sent at any time. It is often most convenient to send a scrobble request when a track has finished playing.

Other considerations:

Do not attempt to determine a track's meta data from its filename. Please only use meta data from well-structured sources such as ID3 tags.
Do not use the corrections returned by the now playing service as input for the scrobble request, unless they have been explicitly approved by the user.
ghost commented 9 years ago

Documentation: http://www.last.fm/api/scrobbling