hzeller / gmrender-resurrect

Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable.
GNU General Public License v2.0
834 stars 202 forks source link

Getting track info out of gmrender #50

Open sm7xvd opened 10 years ago

sm7xvd commented 10 years ago

I suppose i can tail the log file and extract the info i need, but maybe there's a neater way to get artist, title, duration, position and other track info? I'm using gmrender as part of a car audio player which interfaces to the CD changer port of the car stereo. I'd like to present this info on the lcd display i have connected to it regardless of audio source.

vetinari commented 10 years ago

You can run https://github.com/vetinari/upnp-track-info and then wget -qO- http://$your_ip:9999/ to get a JSON of what's running - when state is PLAYING. Current track position is not provided :(

hzeller commented 10 years ago

What I would do is to connect to it just as a UPnP client and then query for the current track or wait for the update callbacks. I do something like that in my UPnP-Display project (same github). (That doesn't properly display the time, as that would need active polling).