The spec indicates the following:
The payload should also include the
listened_at element, which must be an integer representing the Unix time when the track was listened to.
However, it’s unclear what “the track was listened to” means. Does it mean when playback of the track started? When it finished?
The last.fm spec is explicit in that the timestamp should be from when the track started playback.
I ask this here but what I really want is to request the spec to be clarified, so if there’s a better place to do that, I would appreciate pointers.
When I wrote my submission client for MPD I also assumed it would mean when the track started playing.
I agree that the documentation is unclear about this and should be clarified.
Start of listen makes the most sense to me. The majority of players that supported last.fm submission used that date. And LB implementation for such players usually closely follow the last.fm behavior.
I also used the playback start date for my own submission client.
Any suggestion as to where to submit the change request for the specification?
@lucifer @rob Is there some official opinion on this? I just came across this when looking over the foobar2000 component, which uses the time of submission as
listened_at (so either after half the track or 4 minutes into the playback). I just looked over some of the implementations I had been involved with. My own Android submission app and the rhythmbox plugin use start of playback, as does the lollypop player if I interpret the code correctly.
UPDATE: Funkwhale also seems to use timestamp at submission time.
I’ve not had a chance to look at this, but is been in my inbox for weeks it seems. @lucifer would likely be a better candidate to answer this than me. Let me ping him.
@csaavedra @outsidecontext AFAIR we use the start of playback time in most plugins and importers for listened_at so it would make sense to continue with that.
The changes have been merged. I think with this the question is answered.
Ideally clients should use the start time of listening. But it might not always be possible to do so due to technical limitations.