Fast Location Node, plus Explorer Browsing v2.01 [Script]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Fast Location Node, plus Explorer Browsing v2.01 [Script]

Post by DiddeLeeDoo » Tue May 23, 2006 11:02 pm

Based on that I use 2 folder levels to group and organize Music Albums, I was missing a fast way to access these folders inside MediaMonkey.

Image

Music organized like
D:\Music\<Music Section>\<AlbumArtist>\<Album>\
D:\Music\Compilations\<Genre>\<Album>\
<Music Section> does not exist in MediaMonkey... I use the folders for that.

If you have a similar system, you may like this node.

All you have to do is write the right value for your machine here

Code: Select all

MusicRoot= "D:\Music"
You get easy access to Windows Explorer by
First click a second level ie. <AlbumArtist> or <Genre>
Click an album
Click the <AlbumArtist> node again.
Works on an 'every other time' basis.

May do a multi HDD drive version one day, and more functions in the node, for moving music and stuff. At the moment, just it's just a browser.

ChangeLog:
1:00 - 2.00 : Better browsing system.
2.00 - 2.01 : Allows Square Brackets in the Path

Goes to the \Scripts\Auto folder

Code: Select all

'-------------------------------------------------------------------
' Node for Folder Organized Music.
' By DiddeLeeDoo
' Version 2.01
' 26 August 2006
Private MusicRoot
        MusicRoot= "D:\Music"
'                   Music Home Folder without trailing "\"
'-------------------------------------------------------------------
Private ExOnOff
Sub OnStartup
    Set Fso=CreateObject("Scripting.FileSystemObject")
 If Not Fso.FolderExists(MusicRoot) Then Exit Sub
Set nL0=SDB.MainTree.CreateNode
    nL0.HasChildren=True
    nL0.Caption="Music Sections"
    nL0.IconIndex=13
    nL0.UseScript=Script.ScriptPath
    nL0.OnFillChildren="Lv1"
    Script.RegisterEvent nL0, "OnNodeFocused", "fLv1"
    SDB.MainTree.AddNode SDB.MainTree.Node_NowPlaying, nL0, 0
    Set Fso=Nothing
End Sub

Function fLv1(nL0)
    nL0.HasChildren=False
    Lv1(nL0)
    nL0.Expanded=True
    End Function
Function fLv2(nL1)
    nL1.HasChildren=False
    Lv2(nL1)
    nL1.Expanded=True
    End Function
Function fLv3(nL2)
    If nL2.Expanded Then
       ExOnOff=Not ExOnOff
       If ExOnOff Then 
            SDB.WebControl.Navigate nL2.CustomData
            fLv3=2
       Else
            fLv3=1
            nL2.HasChildren=False
            Lv3(nL2)
            Lv4(nL2)
            nL2.Expanded=True
       End If
    Else
       nL2.HasChildren=False
       Lv3(nL2)
       Lv4(nL2)
       nL2.Expanded=True
       ExOnOff=False
    End If
    End Function
Function fLv4(nL3)
    fLv4=1
    Lv4(nL3)
    End Function
Sub Lv1(nL0)
Set Fso=CreateObject("Scripting.FileSystemObject")
Set Fld=Fso.GetFolder(MusicRoot)
Set Fls=Fld.SubFolders
    For Each sFl in Fls
    Set nL1=SDB.MainTree.CreateNode
    	  nL1.Caption = sFl.Name
    	  nL1.CustomData = MusicRoot & "\" & sFl.Name
    	  nL1.IconIndex = 13
    	  nL1.UseScript = Script.ScriptPath
    	  nL1.OnFillTracksFunct = "Lv2"
    	  Script.RegisterEvent nL1, "OnNodeFocused", "fLv2"
    	  SDB.MainTree.AddNode nL0, nL1, 3
    Next
    Set Fso=Nothing
    End Sub
Sub Lv2(nL1)
Set Fso=CreateObject("Scripting.FileSystemObject")
Set Fld=Fso.GetFolder(nL1.CustomData)
Set Fls=Fld.SubFolders
    For Each sFl in Fls
    Set nL2=SDB.MainTree.CreateNode
    	  nL2.Caption = sFl.Name
    	  nL2.CustomData = nL1.CustomData & "\" & sFl.Name
    	  nL2.IconIndex = 20
    	  nL2.UseScript = Script.ScriptPath
    	  nL2.OnFillTracksFunct = "Lv3"
        Script.RegisterEvent nL2, "OnNodeFocused", "fLv3"
        SDB.MainTree.AddNode nL1, nL2, 3
    Next
    Set Fso=Nothing
    End Sub
Sub Lv3(nL2)
Set Fso=CreateObject("Scripting.FileSystemObject")
Set Fld=Fso.GetFolder(nL2.CustomData)
Set Fls=Fld.SubFolders
    For Each sFl in Fls
    Set nL3=SDB.MainTree.CreateNode
        nL3.Caption = sFl.Name
        nL3.CustomData = nL2.CustomData & "\" & sFl.Name
        nL3.IconIndex = 20
        nL3.UseScript = Script.ScriptPath
        nL3.OnFillTracksFunct = "Lv4"
        Script.RegisterEvent nL3, "OnFillTracks", "fLv4"
        SDB.MainTree.AddNode nL2, nL3, 3
    Next
    Set Fso=Nothing
    End Sub
Sub Lv4(nL3)
    SQL=Mid(nL3.CustomData,2)
    SQL=Replace(SQL,"'","''")
    SQL=Replace(SQL,"[","[[]")
    SQL="AND SongPath Like '"& SQL &"\"&Chr(37)&"'"
    SDB.MainTracksWindow.AddTracksFromQuery(SQL)
    SDB.MainTracksWindow.FinishAdding
    End Sub
Last edited by DiddeLeeDoo on Sun Aug 27, 2006 3:57 am, edited 17 times in total.
Image

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Wed May 24, 2006 12:16 am

too toss you a curve ball.

i have multiple hard drive's that are nothing but music.

how to make the above work on multiple drives?

:o 8) :wink:
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Wed May 24, 2006 12:31 am

Guess that can be done with some custom object collections.

That is a part of the 'Refining' process. Just thought it was fun to drop this new way of doing it as far as I know. At this stage I'm just pleased by have fast access to the folder organized system.
Image

rovingcowboy
Posts: 14153
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Post by rovingcowboy » Wed May 24, 2006 12:36 am

yep it is a differnt thing to look at. but i can't test it as if i do i'll forget what i am doing with the ratings.? i am not that good at doing multiple things when messing with codes. it drives me nuts i just have to make one webpage at a time then go to the next one.

8)
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy 5 Android 5) 6. Proscan tablet Android 4.3 ) 7. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Wed May 24, 2006 12:52 am

Need another few free moments to make it more 'refined'. :)
Takes time...
Step 1: Simple before becoming more complex...
Step 2...not done yet.
Image

DiddeLeeDoo
Posts: 1017
Joined: Wed Mar 01, 2006 1:09 am
Location: In a jungle down under
Contact:

Post by DiddeLeeDoo » Sun Aug 27, 2006 2:32 am

Updated this node a bit. Just a quick edit to make explorer browsing a bit friendly... plus show all songs of an artist..
Image

Post Reply