I wasn't sure where to post this, so I will put it here in my thread. Work is progressing nicely towards a new version of the web gui. This time around it will have music, movies, video, weather, along with a few other tricks, some which you have seen in my previous interfaces (like searching) and some new ones.
One of the nicest features of XBMC compared to other media players is it's ability to generate icons for content. i want to be able to display all of these icons in my web interface. Folder icons, xbe icons, albumart, etc. I've got the currentlyplaying coverart working nicely by finding out the location of the .tbn file then copying it to q:\web\ with a .jpg extension. Now I want to be able to do the same thing with the icon from any type of file, unfortunately I can't seem to fond the functions needed to get the icon for an arbitrary file (especially if that icon has not been put into the cache yet)
getCacheThumbName(...) the existing python function to get the thumbnail for an item just converts the filename to a crc, it does not actually get the thumb or cache it. There is also a getthumbnail call in the httpapi but I have not had much luck with that either.
The only place i've been able to get this to work so far is on the music library. The album art location stored in the music sqlite database is correct, and I am able to use it to display a collage of album covers.
--
Request for function:
Icon Cacher
I would like to modify the functionality of getCacheThumbName or create a new function which will:
-take the input of a filename and if necessary (music, video, program, picture?)
-figure out the thumbnail location the same way it would in a skin
(embeded into file, as folder.jpg, already in cache, etc)
-cache thumbnail into appropriate thumbnail cache folder as .tbn
q:\userdata\thumbnails\*\*.tbn (wiki)
-return the full path to the .tbn file
q:\userdata\thumbnails\music\a\a12345f.tbn (wiki)
this function should be callable from python
I believe the functions that will be required to do this can be found in FileItem.cpp
This is where the actual thumbnail search/creation/cache of the icon appear to get done.
Thanks! I will post an update and some screenshots when it gets closer to release time.