Vibe Streamer v3 Download Hack

jsidhu

29-05-2008 00:16:44

I have limited bandwidth, so I have a little hack to be able to download some songs localy... atleast till transcoding works. so I have a little hack that lets me download from the new version..

Edit file C\Program Files\Vibe Streamer\sites\standard\js\desktop.js[/color1jt368jq]

On line 1286, right after the browseOnlyEnabled check, add the following code

[code1jt368jq]
if(e.target.className.match("desktop-icon-file")) {
//Ext.Msg.alert("Info","You clicked on the icon!");
try {
Ext.destroy(Ext.get('downloadIframe'));
}
catch(e) {}
Ext.DomHelper.append(document.body, {
tag: 'iframe',
id:'downloadIframe',
frameBorder: 0,
width: 0,
height: 0,
css: 'display:none;visibility:hidden;height:0px;',
src: vibestreamer.Configuration.SHARE_URI + "/" + node.attributes["virtualPath"]
});
return;
}
[/code1jt368jq]

This code will let you download a file by double-clicking on the icon. It will not let you download if you have browse only enabled.

If this post is in violation, please let me know and I'll remove this.


BTW, I've confirmed this alpha version to be working correctly on Windows Server 2003 Standard SP2 and XP SP2

jsidhu

29-05-2008 00:22:53

oh, and if you want, you can add a little note to tell the user..

On line 1216, change

[code2clcaq4z]title: "Files",[/code2clcaq4z]

to

[code2clcaq4z]title: "Files (Double click the icon to download)",[/code2clcaq4z]

js

Amish

02-06-2008 22:36:46

works like a charm. Is this for alpha 3 becuase the code is in the wrong place D

Maybe put like find this code.....put my code after it...

And so on so a user knows where to put it D

nice job though

Potatoking

13-06-2008 09:21:39

Is this really working beacuse I cannot find where to put this code in the directory mentioned.

MockY

13-06-2008 09:36:20

Neither can I

siit

13-06-2008 14:10:09

This was a modification to the Vibe Streamer 3 alpha 3 javascript. But things to get refactored quite a lot (especially during an alpha and beta stage).

So check out this thread for some more info on how to write addons that doesn't require the "core" code to be modified

http//www.vibestreamer.com/forum/viewtopic.php?t=561