Announcements

Help Wizard

Step 1

NEXT STEP

I'm trying to check if a new track has been added in a playlist

I'm trying to check if a new track has been added in a playlist

hi everyone,
I'm trying to check if a new track has been added in a playlist I have indicated. Is it possible to do this?
Reply
5 Replies

Yes, that's possible. There are two options to do this:

  1. Playlist items have the field added_at. So, you can check it based on that. Here's a demo.
  2. You can also store a set of track ids somewhere, and check with a difference function if something has changed.

Cheers,

Hi Ximzend

Thanks for the suggestion, my goal is to write a script in Node.JS language so I'm interested in knowing how to check if a new song has been added to the playlist through an event like:
Spotify.on ('<EVENT NAME>', function to perform).

to be honest I don't want to have a function that makes many calls to spotify otherwise there could be problems.

In that case, no.

The Spotify Web API doesn't support Web Sockets.

ok but my doubt is the following: how does the IFTTT platform do what I explained above?

The only possible way is by checking it regularly.

Suggested posts