When listening to other people’s playlists, I often want to save a song to one of my playlists. I do this now via IFTTT. A service that takes an argument of a playlist ID and a track ID would be handy.
aside:
I thought I could figure out something by grabbing the access token from ‘/config/.spotify-token-cache’ and use it in AppDaemon, but the Spotify integration’s token scope doesn’t allow ‘playlist-modify-private’ or ‘playlist-modify-public’ and I’m not savvy enough to figure out how to generate a new token with that scope.
I developed the SpotifyPlus integration that could be modified to do this. Would something like the following work? Note that it does not exist, but could be easily added.
playlist _id:
The Spotify ID of the playlist.
Example: 5AC9ZXA7nJ7oGWO911FuDG
uris (str):
A comma-separated list of Spotify URIs to add; can be track or episode URIs.
Example: spotify:track:4iV5W9uYEdYUVa79Axb7Rh,spotify:episode:512ojhOuo1ktJprKbVcKyQ.
A maximum of 100 items can be added in one request.
position (int):
The position to insert the items, a zero-based index.
For example, to insert the items in the first position: position=0;
to insert the items in the third position: position=2.
If omitted, the items will be appended to the playlist.
Items are added in the order they are listed in the uris argument.