Help - Adding entire folder from left frame

kjparenteau

25-02-2008 19:50:06

I've been working on a new skin, but I've run into an issue that I can't seem to work around... Anyone have any idea on how to add in the "+" (add folder to playlist) option on the left side (folder browser) window?

Sure this is easily solved by putting all your folders down one more subfolder so that you can have the + icon showing on the right side, but I feel that adding this option to the left window would be a nice feature addition to the skin I'm creating.

Thanks,
Kevin

Amish

25-02-2008 21:57:11

Recursivly Scan the folder. Done.

kjparenteau

26-02-2008 21:44:30

Right, but I'm trying to avoid that. ) I'd like to use the same + icon that you see on the right frame for adding folders to the left side as well. I'm just having a hard time figuring out what code I need, and then also where to put that code for the left side.

Amish

26-02-2008 22:21:42

Why avoid it.

Psudo-Code

folder(F){
if (hasFolders == true) {
for (i in folderList) {
folder(i)
}
}
AddSongsInDirectory()
}

easy

kjparenteau

27-02-2008 21:25:48

Forgive my noobishness... lol What file would this go into and what section within that file?

Here's what I have done to the right hand side. I changed the float of the addfolder option to show as the image below. I want to have the same + icon to the left of the folders on the left hand window just like this...

[img1ktwj0y2]http://files.selfip.com/img/vibestreamer/folderexample.png[/img1ktwj0y2]


Let me know where that code should go and I will give it a try and let you know of the results.

Thanks,
Kevin

Amish

28-02-2008 11:54:57

It should go in the process_addfolder.vibe file

=)

kjparenteau

28-02-2008 16:30:05

Hmmm.... I think I'm missing something somewhere... If I add it into that file, I don't see any change. I think there's a piece that's missing, or I have to change some additional code in another file somewhere else too.. Here's the current code (no change from default)...

Where would I insert your code first off, and are there any other alterations that are required for it to work?

Thanks,
Kevin


[code62fhvd0v]<script>
<?

var files = get_files(request_querystring("id"));
var numFiles = count(&files);
var numMP3Files = 0;
var i = 0;

while ( i<numFiles )
{
var file = &files[i];

if ( file.MIMEType=="audio/mpeg" )
{
numMP3Files++;

print("parent.add_track('" + str_jsafe(file.VirtualPath) + "');");
}

i++;
}

if ( numMP3Files==0 ) {
print("alert('No audio files could be found in the folder.');");
}

?>

parent.g_bThreadFrameIsBusy = false;

</script>
[/code62fhvd0v]

Amish

28-02-2008 19:09:43

siit, is there a way to make a function in the vibe language?

kjparenteau

28-02-2008 19:23:46

If this isn't possible, not a huge deal, but would love to see that feature in 3.0! )

Or lets put it this way... If we can have an option to add the "Root" folder that's being shared on the right side at the top that'd be great too. Maybe in the header as an option like "Add All" or something.

My Music (folder being shared)
-Artist Folder 1
-Artist Folder 2
-Artist Folder 3

I guess it doesn't matter where this option is. But if there is a way to add a button to add the entire contents of the folder that's being selected from the left hand window. Like if I had "My Music" selected, it will list on the right the folders and files within it. Lets make an option to add the entire contents from that. )