I will see... Not being evasive but I'm experiencing terminal illness at the moment so I'm all over the place. It wasn't a complex bit of code though, but I'll see what I can find.
Thank you. Sorry, I had a look but I didn't find the code (it's not in the github repo for the rest of the system I made, and I no longer own the laptop I wrote it on so it's my bad).
Someone has posted something similar, but it was literally just about 10 lines of python that read the right key in the dictionary and then posted that to a flask web page that another part of the system read to know what track was being played. I'm not a great programmer and it took me maybe 15 minutes to do, so it should be easy enough!