Try
function OnClick(clickData) {
var cmd = clickData.func.command;
var tab = clickData.func.sourcetab;
cmd.deselect = false;
if (tab.selected_files.count == 0) return;
var item = tab.selected_files(0);
if (item.metadata != 'audio') return;
cmd.RunCommand('Rename FROM="' + item.path + '" TO="' + item.metadata.audio.mp3album + ' (' + item.path.filepart + ')"');
}
Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none">
<label>37432</label>
<icon1>#rename</icon1>
<function type="script">
<instruction>@script JScript</instruction>
<instruction>function OnClick(clickData) {</instruction>
<instruction> var cmd = clickData.func.command;</instruction>
<instruction> var tab = clickData.func.sourcetab;</instruction>
<instruction> cmd.deselect = false;</instruction>
<instruction> if (tab.selected_files.count == 0) return;</instruction>
<instruction> var item = tab.selected_files(0);</instruction>
<instruction> if (item.metadata != 'audio') return;</instruction>
<instruction> cmd.RunCommand('Rename FROM="' + item.path + '" TO="' + item.metadata.audio.mp3album + ' (' + item.path.filepart + ')"');</instruction>
<instruction>}</instruction>
</function>
</button>