After having to manually generate the required format for Sonos API calls for Spotify Albums. I decided to use the IOS shortcut app to automate the process.
Steps and images below.
Step 1: Go to Spotify App on phone
Step 2: Look for an Album of your choice
Step 3: Copy URL from Album (On phone)
Step 4: Create Shortcut within IOS Shortcuts App (Steps and images below)
Step 4.1: Get data from clipboard
Step 4.2: Put data in text field
Step 4.3: Replace the initial part of the spotify link("https://open.spotify.com/album/") with "spotify:album:" in order to begin to prepare the url to be run in the Sonos API ( node-sonos-http-api package created by jishi. You can read all about it here: https://github.com/jishi/node-sonos-http-api)
The link now looks like this: "spotify:album:7GoZNNb7Yl74fpk8Z6I2cv**?**si=F6AKhJCmTlutZixM368CZQ"
Step 4.4: Split the current state of the link using by using a "?"
Part 1: "spotify:album:7GoZNNb7Yl74fpk8Z6I2cv"
Part 2: "si=F6AKhJCmTlutZixM368CZQ"
Step 4.5: I set a variable with the link using only the first part of the split
Variable = "spotify:album:7GoZNNb7Yl74fpk8Z6I2cv"
Step 4.6: Copy the item back to the clipboard
Step 5: Add newly generated shortcut to your home screen for ease of access/use
Step 6: Go to the Simply NFC app -> Click on Write -> Add Record -> Add Text Record -> and click paste
Step 7: Write to tag
Comments
Please log in or sign up to comment.