Do you all think it’s safe to just assume that the first number in the Freegal URL is the barcode, and add it as a barcode to releases? Or are there corner cases I should look out for where it might not be a barcode?
Seems to be pretty safe to assume that’s the barcode. However, easiest way to know is when you are on release editor if the barcode checks as a valid barcode or not.
Ooh good catch. At first I thought that might be something weird about some singles. Like maybe Freegal took a track off an album and called it a single without any artist/label intent, so they used a track ID instead of a UPC/EAN. But I looked at a few other singles and haven’t noticed any more evidence of that. In the API json data for that album[1] it shows albumId: 9999900361592 and songId: 376863743.
I also found https://freegalmusic.com/album/34248956/1[2]. The URL you found with the 9s has 8 digits after the 9s, and this one has 8 total. Maybe a coincidence, maybe they’re 9-padding some other form of ID.
If the number is a valid barcode and does not start with a bunch of 9s (or otherwise look odd, like too many 0s or something), do you all think it’s safe to assume it’s a barcode?
https://api.freegalmusic.com/v1/album/songs?albumId=9999900361592&provider=1&language=en in the dev tools. ↩︎
<https://example.com> renders as https://example.com, if you want to make a URL clickable while also showing the structure of it. ↩︎