Hello all,

I've built a few squeezebox controllers and displays using RaspberryPi zero's but having never coded before these projects, other than a bit of Basic at school many years ago, I have muddled my way through learning basic python for these projects but it's now time to tidy the code up.
My code is really inefficient (and I guess I'm using bad practice) as I do a huge amount of 'polling' every few seconds - Is the squeezeserver for the player playing/paused, artist, track name? etc.

I'm guessing I should be using callback with the LMS tools but I'm strugging to get a grip on how to code it.
I've looked at the examples but don't really have an understanding of classes or decorators. I've also noticed that the examples for instance check for volume change but I can't see where it selects which player is changing it's volume.

Could anyone help me out with some example code that I can try out and I should be able to find my way from there or give me some advice?

For reference this is the sort of thing I am doing with my raspberry Pi's:

Any help is much appreciated.

Many thanks,