liblistenbrainz icon indicating copy to clipboard operation
liblistenbrainz copied to clipboard

listened_at is required

Open Weissnix4711 opened this issue 1 year ago • 2 comments

The listened_at field is required for submitting listens, but we default to None and do not perform any validation for it before calling the API.

Validation should probably be added here for listened_at field for LISTEN_TYPE_SINGLE and LISTEN_TYPE_IMPORT: https://github.com/metabrainz/liblistenbrainz/blob/e9d211b6616c0f69e9324bcd6d5ec8720c900c97/liblistenbrainz/utils.py#L21

Also, maybe it's worth defaulting to the current time? Or should that be left up to the user?

Weissnix4711 avatar Feb 15 '24 16:02 Weissnix4711

Also, maybe it's worth defaulting to the current time? Or should that be left up to the user?

I reckon defaulting to the current time is a good idea.

Skivling avatar Oct 29 '25 08:10 Skivling

Listened_at being required is exactly as intended -- we want the user to specify the exact time the song was listened to, assuming timestamps can lead to unwanted behaviour.

mayhem avatar Oct 29 '25 09:10 mayhem