Closed KCMertens closed 2 years ago
Hey, I didn't see this issue until now, I'll take a look at the releases you provided!
Should be fixed in https://github.com/raffomania/songsonar/commit/14190455f3dee0b23ca9af331bb17dc9f53057e8. Please let me know if any duplicates still pop up and I'll reopen the issue :)
I'm not sure why, but some albums are appearing twice. Here is a screenshot: Copying the links to the albums, they point to the same id. Here are links to the duplicated albums in the screenshot, so you can take a look at the metadata if you want: ZODIAX 3+: https://open.spotify.com/album/1RrAC3JspuaHeGPOZwhT6v United EP: https://open.spotify.com/album/1JFQ9o7ALn51hvMRZObGv1 TELL U: https://open.spotify.com/album/0ZRcvD0RgToYTqzC7LNt05
I've also found this REALLY weird case, where there do seem to be two versions of the same album, but only one appears under the artist page (?). Most tracks seem to be identical, but some have a slightly different name in each version of the album. https://open.spotify.com/album/63XwFTcPwdlfstuizHzsAW https://open.spotify.com/album/4rAfwQxmCMDx5q0WrHyn0S Something with different versions based on region perhaps?
I've looked at the function here and I can't see how this could even happen, unless Spotify itself is returning albums multiple times, perhaps once as Album, once as Single, or once for two different artists, or once per region (copyright reasons?) I don't think I've seen an album appear 3 or more times, only ever 2 times.
Without looking at the API responses, I'd think most of the dupes could already be eliminated by just doing
all_albums.dedup();
hereThe last case is different, it might need a dedup on individual track ids? If the same track appears with two different IDs, then I guess there's not much that can be done with certainty, but deduping on title+artist name+album would probably work in 99% of the cases.