It was the url I was trying to use, it was missing the address of my Pi with the Volumio player at the beginning. Interestingly if I had been using the web radio option it would have worked and the radio stations logo would have appeared!
I should clean up my code now but as it is working I will leave it as is.