garylaski / userscripts

My userscripts for soundcloud, musicbrainz
5 stars 2 forks source link

Wrong release date from SoundCloud #13

Closed jesus2099 closed 11 months ago

jesus2099 commented 11 months ago

The only dates I can see on https://soundcloud.com/xjapanmusic/angel is 2023-07-28 (post date and published date). But the importer said 2023-07-20: https://musicbrainz.org/edit/102703093

garylaski commented 11 months ago

The soundcloud hydration data has several fields for date. In your example:

"created_at": "2023-07-20T15:17:55Z"
"display_date": "2023-07-28T00:00:00Z"
"release_date": "2023-07-28T00:00:00Z"

In this case, what you want is release_date or display_date, which is a date value set by the artist. The created_at value is what this script is using, which is when the track was uploaded.

In some cases, the release_date field is null, incorrect or purposefully abused, which is why I originally chose the created_at field for getting date information from (this was a bad choice).

I'll update the script to use the display_date field, which seems to have more logical dates.

jesus2099 commented 11 months ago

Thank you for your explanation!