Ok I made a few changes in the MK2assistant node-helper.js
var re = new RegExp("https:\/\/open\.spotify\.com\/([a-zA-Z0-9?\/]+)", "gm")
//var re = new RegExp("\\(.open\\.spotify\\.com – (https:\\/\\/open\\.spotify\\.com[^ ]*).\\)", "gm")
var openSpotify = re.exec(str)
if (openSpotify) {
console.error("[AMK2] openSpotify found:", openSpotify[0])
foundOpenSpotify = openSpotify[0]
And as well in Nowplayingoncpotify/core/Spotifyconnector.js
let uri = replaceall("/", ":", url.replace("https:\/\/open.spotify.com", "spotify"));
The slash were not escaped in the url making half of the line be a comment.
After updating raspotify to the latest I can say : “Michael Jackson on spotify” and the song start playing .
Good stuff .
I’m wondering if slash should be escaped as well here I haven’t do it since it’s working :
const tokenRefreshEndpoint = 'https://accounts.spotify.com/api/token';
const apiEndpoint = 'https://api.spotify.com/v1/me/player';
As you can see the editor consider the part after the slash as comment
Not sure how it works on interpretor side.
anyway I’ll post my update in the repo .
Ejay