Tonight I was giving Rhapsody another look. I have been using Napster mainly because it was a little cheaper. Rhapsody.com launched back in Dec 05. You can stream from within a web browser and the kicker is you don't have to use Internet Explorer, and they provide an Firefox extension! Sweet! Only one problem, the XPI installer bombs with an incorrect message about insufficient disk space. (Boo! Bugs!) I did a lot of googling and didn't find anyone with an answer, so I resorted to taking a look inside the XPI to see why it's so TWEEKED.
I figured out the url to the XPI download and then used wget to save it to my disk. (Is there an easier way?)
An XPI is just a zip file, so I unzipped it and pulled up install.js in my trusty editor (Emacs). The problem is right here:
var kilobytesAvailable = parseInt(bytesAvailable / 1024);
By looking here ~/.mozilla/firefox/pjfmmgsq.default/install.log I could see that parseInt is returning a very small negative number. Maybe diskspaceavialable isn't returning an int, or maybe it's just broken? I am not a java programmer and it's late (way past bedtime AGAIN), so I took the brute force approach and commented most of this function out.
function verifyDiskSpace(dirPath, kilobytesRequired)
{
// var bytesAvailable = File.diskSpaceAvailable(dirPath);
// convert from bytes to kilobytes
// var kilobytesAvailable = parseInt(bytesAvailable / 1024);
// if (kilobytesAvailable < kilobytesRequired)
// {
// logComment("Insufficient disk space: " + dirPath);
// logComment(" required: " + kilobytesRequired + "KB");
// logComment(" available: " + kilobytesAvailable + "KB");
// return INSUFFICIENT_DISK_SPACE;
// }
return SUCCESS;
}
The image above shows the sweet strains of Serpent's Tooth (a rhythm changes tune mentioned by Terell Stafford at the Stanford Jazz Workshop) tweeting from the tiny speaker of my Thinkpad T40. Up and running on Firefox 2.0.0.6 on Ubuntu Fiesty.
The hacked XPI is available below. You've been warned: It doesn't check disk space...and who knows what other surprises it might have for us.
| Attachment | Size |
|---|---|
| RhapsodyPlayerEngine_Inst_Linux_space_check_disabled.xpi | 1.07 MB |
Comments
you Fsking rule /// i could
you Fsking rule /// i could not figure this out