the question was, how do you KNOW that music is playing? what code tells u?
I would expect the spotify playing module to do a sendNotification(“spotify_Playing”,something);
so that other modules might know… it does not do that (looking at the code)…
you could fork the existing code and add the 2 lines (one playing, one not) of code and submit an enhancement (pull) request to the module owner…