My problem: Differentiate between tracks that are playable and not.
I am trying to use Spotipy to print me the metadata details of all the tracks in a playlist.
Some songs I have added to my playlist is no longer available, and therefore do not show in my spotify playlist (greyed out). However they do print normally togheter with the rest of the tracks that are available. I do not want them there; if I can't play them at this time I don't want them to show in my printed playlist.
I check which markets the track is available in to determine if it should print or not. This is working fine.
'available_markets': []
The problem I have is that there are some tracks that do not have any available markets and are empty like the code snippet shows. They are identical to the songs tracks that are unavailable to me. But I can still play them! This means my code to remove unavailable songs also removes playable song.
I haven't found another way to get data on if a track really is available or not. Anything I have missed?
question from:
https://stackoverflow.com/questions/65872480/checking-to-see-if-a-song-is-available-to-play-with-spotipy 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…