Getting If A Track Is Saved

Wraps around this Spotify API endpoint

How to use

After getting a track through either Spotify.Tracks.GetTrack() or any other function/object which contains/returns track objects, the .IsSaved() method of the track object can be used.

.IsSaved() expects no parameters and will return if a track is saved to the current user's Your Music library.

Example

This example will:

A) Get a track with Spotify.Tracks.GetTrack() by the track's Spotify ID

B) Check if the track is saved with the .IsSaved() method.

GoodSongIMO := Spotify.Tracks.GetTrack("4A6eJ3gOmVdD7C69N3DC7K")
MsgBox, % GoodSongIMO.Name " saved = " GoodSongIMO.IsSaved()

An alternative way to do this without getting the full track object is the Spotify.Library.TrackIsSaved() method, which takes a track ID, and would tell us if it is saved in a single API call.

Spotify.Library.TrackIsSaved("4A6eJ3gOmVdD7C69N3DC7K")