Posts: 29
Joined: May 2012
Reputation:
0
amand
Junior Member
Posts: 29
Hello!
This is my first post in this xbmc forum. I am working on a little visualization addon for linux in C/OPENGL, and I'm wondering if there is a way to get some data from xbmc like the fanart path, or the cd cover...
By looking some of the code for visualizations, I have not seen access to anything apart the audiodata...
It could be very interesting to access more information for a song/album/artist.
Any ideas ?
Do I need to access the xbmc database by myself via sqlite/mysql ?
Posts: 29
Joined: May 2012
Reputation:
0
amand
Junior Member
Posts: 29
Thanks for the idea. I was thinking for a more direct way... But it could be a solution, if I can get at list some information about the song (title or artist). And, by the way, I will need to write a JSON parser...
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
tons of libraries. we use libyajl. not the best performance but very small footprint.
Posts: 29
Joined: May 2012
Reputation:
0
amand
Junior Member
Posts: 29
I just find in the code that we can get album thumb with the method onAction...
I see in Visualisation.h (method UpdateTrack) that m_AlbumArtThumb.c_str is passed to OnAction...
I have tried this, but I only get an empty string, or a string with "DESTROY"...
Anyone know how to get the path of the thumb ?
Posts: 1
Joined: Apr 2013
Reputation:
0
I just started experimenting with visualization development and I'm able to get the thumb/cover image path (XBMC 12.1 Win32), but it specifies the song file that is currently playing. This makes sense because the image is embedded in the mp3 file as opposed to sitting in the directory as "folder.jpg". The problem now is opening the mp3 using the samba path, re-parsing the ID3 tag, and getting the cover image data. Maybe I'm missing something, but it would seem that since XBMC already has the image data there should be a straight-forward way to access it without doing all of that. It's kind of a bummer that we don't have a pointer to the image data as a member of the VisTrack class. That would make more sense to me.