MM5: Rename Artist Node with MM5 Script?
Posted: Thu Oct 23, 2025 9:57 pm
I have a PILE of tracks with artist listed as Last Name First. I want everything First Name First. I have a script that cycles through a selected track list to do this. Many tracks have more than one artist, separated by semi-colons, but the script I have doesn't handle that.
I noticed, when I rename an artist's node, in the tree, it updates the names of all the tracks for that artist, even if the track has multiple artists. I decided I want a script that gets the name of the selected Artist Node, fixes the name, then writes it back to the node, kicking off that automatic updating of the tracks.
I get the name using a script that starts:
From there, I parse it and build the new name. I've used a messageDlg to verify the script works to that point. From there, I thought I could simply do:
Those of you in the know, already know, this doesn't work. I'm the first to admit, where MM is concerned, I'm a total hack, so I'm not really sure if this is a reasonable thing to expect to work. Is there a simple way, from here, to write the new title string to the node, thereby touching off the automatic updating of the associated tracks?
I noticed, when I rename an artist's node, in the tree, it updates the names of all the tracks for that artist, even if the track has multiple artists. I decided I want a script that gets the name of the selected Artist Node, fixes the name, then writes it back to the node, kicking off that automatic updating of the tracks.
I get the name using a script that starts:
Code: Select all
actions.ArtistNodeFNF = {
title: _('Artist Node FNF'),
hotkeyAble: true,
execute: function () {
var OldArtistTitle, NewArtistTitle;
var node = currentTabControl.mediatree.controlClass.dataSource.focusedNode;
OldArtistTitle= node.title;
Code: Select all
node.title = NewArtistTitle;
node.commit();