Remove Nodes

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

J

Remove Nodes

Post by J »

Is it possible to remove some of the nodes, e.g. rating, and if so how?
/J
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

J

Post by J »

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...
Eyal
Posts: 3119
Joined: Sun Jun 26, 2005 9:27 am
Location: Québec
Contact:

Post by Eyal »

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

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

Eyal
Skins for MediaMonkey: Cafe, Carbon, Helium, Spotify, Zekton. [ Wiki Zone ].
Sammy20
Posts: 110
Joined: Thu Feb 17, 2005 5:42 am

Post by Sammy20 »

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.
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

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

Post by J »

Thanks!
This works like a charm. But is there really no way to get rid of "Titles"? Thats probably the worst one...
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

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
Last edited by onkel_enno on Sat Sep 03, 2005 7:16 am, edited 2 times in total.
Morten
Posts: 1092
Joined: Thu Aug 11, 2005 11:31 am
Location: Norway

Post by Morten »

I want to try something:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Title)
onkel_enno
Posts: 2157
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

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.
demm
Posts: 116
Joined: Tue Oct 21, 2003 11:31 am
Location: Austria
Contact:

Post by demm »

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