I have posted various nifty things i have been able to do with the Enigma2 STB's. Here is another example :
I've had a music song title/artist popup for years and its been working well. Being its been so stable and reliable, i decided to put a bit more time into the project. I have song title and artist displayed when the song changes. I recently added St Barth and Nostalgia @ 34w along with the existing muzak channels.
I had a couple little issues that i worked out on my last version. How it works - when the song changes, my program detects that and displays a timed message box that pops up on the TV. (enigma2 message box) If i turned to a service and the song was towards the end, I'd get a double message box on top. Kinda quirky. There was no way that i saw on how to determine if a message box was already being displayed. Thanks to 'AI' it listed off half a dozen ideas, none of them worked, except one. Enigma2 allows you to take a screen shot of the whole screen, or just video or just OSD (on screen display). Well, if i opt for a OSD picture, and you have no OSD active, the picture will be blank. So, i can take a picture and look at the size of the result. If the size is representative of a blank picture, there is no OSD active, otherwise there is. Brilliant! So, my program can see there is already a message box on screen and handle that properly.
The second problem was with Nostalgia. If you query their server more than once every couple minutes, it returns the station name instead of the current song. Go figure? Well, i think 1 minute is far more likely to catch a song change in a more timely fashion. My program essentially uses CURL to fetch the HTML data. Curl has a ' -x ' command that utilizes a specified proxy server to fetch the URL. So, i modified the program so it toggles between normal and proxy, that way i can query the server every minute, from one location and next from the other.
I then added another couple features... If i missed the song title/artist, i can up my volume by one notch and it will re-display the current title/artist. If i decrease my volume by one notch, then it will bring up the last song that played.
I've had a music song title/artist popup for years and its been working well. Being its been so stable and reliable, i decided to put a bit more time into the project. I have song title and artist displayed when the song changes. I recently added St Barth and Nostalgia @ 34w along with the existing muzak channels.
I had a couple little issues that i worked out on my last version. How it works - when the song changes, my program detects that and displays a timed message box that pops up on the TV. (enigma2 message box) If i turned to a service and the song was towards the end, I'd get a double message box on top. Kinda quirky. There was no way that i saw on how to determine if a message box was already being displayed. Thanks to 'AI' it listed off half a dozen ideas, none of them worked, except one. Enigma2 allows you to take a screen shot of the whole screen, or just video or just OSD (on screen display). Well, if i opt for a OSD picture, and you have no OSD active, the picture will be blank. So, i can take a picture and look at the size of the result. If the size is representative of a blank picture, there is no OSD active, otherwise there is. Brilliant! So, my program can see there is already a message box on screen and handle that properly.
The second problem was with Nostalgia. If you query their server more than once every couple minutes, it returns the station name instead of the current song. Go figure? Well, i think 1 minute is far more likely to catch a song change in a more timely fashion. My program essentially uses CURL to fetch the HTML data. Curl has a ' -x ' command that utilizes a specified proxy server to fetch the URL. So, i modified the program so it toggles between normal and proxy, that way i can query the server every minute, from one location and next from the other.
I then added another couple features... If i missed the song title/artist, i can up my volume by one notch and it will re-display the current title/artist. If i decrease my volume by one notch, then it will bring up the last song that played.