Remove Nodes

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Remove Nodes

by demm » Wed Sep 14, 2005 4:45 am

onkel_enno wrote: That it should be, but I haven't tested it yet.
works! thx!

by onkel_enno » Sat Sep 03, 2005 6:58 am

Morten9300 wrote:I want to try something:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Title)
If it workes, then it's not included in Scripting-Help-File :cry:

EDIT:
No, it doen't work.

by Morten » Sat Sep 03, 2005 6:51 am

I want to try something:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Title)

by onkel_enno » Sat Sep 03, 2005 6:43 am

There is a way, but I need a few moments for it. Wait and see :)

That it should be, but I haven't tested it yet.

Code: Select all

Dim strNode
strNode = SDB.Localize("Title")
Dim Node
Dim Nodes
Set Nodes = SDB.MainTree.Node_Library

if Not (Nodes is Nothing) then
   SDB.MainTree.CurrentNode = Nodes
   Nodes.Expanded = True
   Set Node = SDB.MainTree.FirstChildNode(Nodes)
   do while not (Node is Nothing)
      if LCase(Node.Caption) = LCase(strNode) then
         SDB.MainTree.RemoveNode(Node)
         exit do
      end If
      'MsgBox node.caption
      Set Node = SDB.MainTree.NextSiblingNode(Node)
   loop
   Set Node = Nothing
end if
Set Nodes = Nothing
It's taken from here

by J » Sat Sep 03, 2005 6:32 am

Thanks!
This works like a charm. But is there really no way to get rid of "Titles"? Thats probably the worst one...

by onkel_enno » Sat Sep 03, 2005 6:05 am

For Virtual CD it should be Node_VirtualCD, but there is nothing for Titles

by Sammy20 » Sat Sep 03, 2005 3:37 am

This is very cool stuff. I have removed everything I wanted, except for the 'Virtual CD', and 'Title' nodes.

Can someone give me advice on how to remove those 2?

Here's my script code:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Artist)
SDB.MainTree.RemoveNode(SDB.MainTree.Node_Rating)
SDB.MainTree.RemoveNode(SDB.MainTree.Node_Album)
SDB.MainTree.RemoveNode(SDB.MainTree.Node_Genre)
SDB.MainTree.RemoveNode(SDB.MainTree.Node_Classification)
SDB.MainTree.RemoveNode(SDB.MainTree.Node_Previews)
SDB.MainTree.RemoveNode(SDB.MainTree.Node_Year)

I use magicnodes for my music browsing.

by Eyal » Fri Sep 02, 2005 11:52 am

No you don't need any entry in Scripts.ini.

Just put the MyScriptsRemoveNode.vbs in \Mediamonkey\Scripts\Auto\ folder and restart Mediamonkey.

Eyal

by J » Fri Sep 02, 2005 10:58 am

Thanks for the quick answer!

The problem is that I´m not very good at this, so if someone could walk me through the process I´d be very grateful.

First I create a file in the Scripts folder - "MyScriptsRemoveNode.vbs"
In it I write

Sub CallMe
SDB.MainTree.RemoveNode(SDB.MainTree.Node_Rating)
End Sub

Is this correct?

Then I´m to define it in Scripts.ini, right?
I´ve tried this:

[RemoveNode]
FileName=MyScriptsRemoveNode.vbs
ProcName=RemoveNode
Order=6
DisplayName=RemoveNode
Description=Removes node Rating
Language=VBScript
ScriptType=1

But obviously this is´nt working...

by onkel_enno » Fri Sep 02, 2005 8:22 am

Remove Nodes

by J » Fri Sep 02, 2005 8:14 am

Is it possible to remove some of the nodes, e.g. rating, and if so how?
/J

Top