Thumbnail download with HTTP API?
#1
Hey guys,

I don't know if this is the right forum to post this question, but here I go :-)

I'm trying to develop a frontend for XBMC (on an XBOX) to control my music (with a Philips TSU9600), so that I don't need to have my TV turned on. I can get it to download the audio thumbnails using the HTTP-API, but it takes too much time to base64-decode it (see snippet below - grabbed from internet).

Is there a way I could just get the thumbnail using http, without it being encoded ? Is there a way I can tell the webserver to export the Userdata\Thumbnails folder to the 'world'. Or can I change the location where the thumbnails are stored to q:\web\... ?

I could ofcourse copy it to q:\web, but that wouldn't really be a nice solution.

<code>
// This code was written by Tyler Akins and has been placed in the
// public domain. It would be nice if you left this header intact.
// Base64 code from Tyler Akins -- http://rumkin.com

var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function decode64(input) {
var output = new Array();
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;

// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

do {
enc1 = keyStr.indexOf(input.charAt(i++));
enc2 = keyStr.indexOf(input.charAt(i++));
enc3 = keyStr.indexOf(input.charAt(i++));
enc4 = keyStr.indexOf(input.charAt(i++));

chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;

output.push(String.fromCharCode(chr1));

if (enc3 != 64) {
output.push(String.fromCharCode(chr2));
}
if (enc4 != 64) {
output.push(String.fromCharCode(chr3));
}
} while (i < input.length);

return output.join("");
}
</code>

Thanks in advance !
Reply
#2
I don't have any information to help you but I like to encourage anyone that know about your question to help you out. I tool want a small applet to control music and streaming music, but so far most of the programs released don't work for me and require too many third party dependencies.

I mainly want a music control for a touch screen, that let's you browse and play mp3's along with streaming shoutcast music. However it just hasn't happened yet Sad
Reply
#3
Is there no other way to do this ?

I tried writing a .spy file to send the picture based on the arguments supplied in the url, but I can't seem to get it working ...

Any thoughts ?

Kristof
Reply
#4
Did you evern find a solution?
Reply
#5
Yes!!! I figured out how to do this!!!!

http://forum.xbmc.org/showthread.php?tid=58389
Reply

Logout Mark Read Team Forum Stats Members Help
Thumbnail download with HTTP API?0