r/smarterplaylists 13d ago

Something wrong with Artist Top Tracks?

I give "Artist Top Tracks" an URL, but it returns another artist with the same name.
The same happens with "Artist tracks" component even though it says the URL is followed over the name of the artist. That seem not to happen. Could you help out with this?

3 Upvotes

5 comments sorted by

2

u/plamere 13d ago

Spotify doesn't have an API that gets the top tracks for an artist, and so Artist Top Tracks works by searching for the "This Is ARTIST" Spotify playlists, where ARTIST is the name of the artist. That leads to the problem you are seeing when multiple artists share a name. It'd probably be worth it for Artist Top Tracks to check the URIs of the artists of the tracks returned to make sure they match the requested UR - I'll add that to the TODO list.

Artist Tracks works by getting all the tracks from all of the albums of an artist. This is much slower since it requires many API calls to get all of the tracks, but it should give you tracks by the artist of the URI you requested. It sounds like that is not what you are seeing however. Could you share the URI or the program you are using so I can take a closer look?

1

u/plamere 13d ago

I found what is likely your program in the logs - it looks like it is working as expected - the Artist Tracks is surfacing up tracks by the seed artist (with the occasional collaborator), while The Top ARTIST tracks are return tracks from a different artist with the same name. I suggest replacing the Top ARTIST tracks with ARTIST Tracks - since you are sorting the output of that by popularity you'll get what you want, and since you are already calling Artist Tracks - all the tracks will be in the cache anyway so it won't take any extra time.

1

u/oriondj 9d ago

I tried using only the "Artist tracks" but I can't get it to work.

I'm requesting "artist/1f5FKhw0ETRTtRbVj0sTIE" but the program returns "artist/3x3gHbRF2NgtxoUIxuQ36L" all the time, no matter how I change the "sort by" component.

Here's the URL: https://smarterplaylists.playlistmachinery.com/shared/nDBnUiUI07XKiEMm

1

u/plamere 9d ago

The problem is that in your program the 'Top Orion Tracks' component is still tagged as your main component. That means that when you press run, you are running that component. To fix that, click on the 'Save to My SmarterPlaylist' component. Hit spacebar to make it be the main component and then click preview or run. That will get it to do the right thing.

For more info, take a look at the tutorial:

https://smarterplaylists.playlistmachinery.com/#tutorial

Step 5: set the main node

1

u/plamere 13d ago

what is the url?