Rename Folder Mask is
function substring(value,length){
return value.length > length ? value.substring(0,length) : value;
}
function bracketif(value){
return value.length > 0 ? '[' + value +']' : '';
}
function ifmultidisc(value) {
if(disctotal>1)
{
return value;
}
else
{
return "";
}
}
albumartist + ' ' + album + ' ' + bracketif(substring(year,4)) + ifmultidisc('CD' + discno)
Rename Filename Mask is
function pad(number, length) {
if (number == '') { return '';}
var str = '' + number;
while (str.length < length) {
str = '0' + str;
}
return str;
}
function ifnotempty(value,sep){
return value.length > 0 ? value + sep : '';
}
function ifnotempty2(value1,value2,sep){
return value1.length > 0 ? value1 + sep :value2.length > 0 ? value2 + sep:'' ;
}
ifnotempty(artist,' - ') + ifnotempty(pad(trackno,2),' - ') + title
I assume you want track artist rather than as stated album artist, because even if single artist album they may for example duet with another artist on some tracks.
Currently a compilation can include a single artist best of compilation although I plan to change to bring in line with iTunes. So for the Compilation Rename mask masks you would not want it to automatically hard code to VA. Its looks like the logic is the same as rename mask except to replace ‘Various Artists’ with ‘VA’ for album artist, so lets just add one more function for this giving us
Folder Compilation Rename Mask
function substring(value,length){
return value.length > length ? value.substring(0,length) : value;
}
function bracketif(value){
return value.length > 0 ? '[' + value +']' : '';
}
function ifmultidisc(value) {
if(disctotal>1)
{
return value;
}
else
{
return "";
}
}
function ifva(value)
{
if (value == 'Various Artists')
{
return 'VA';
}
else
{
return value;
}
}
ifva(albumartist) + ' ' + album + ' ' + bracketif(substring(year,4)) + ifmultidisc('CD' + discno)
and the File Compilation Rename mask is then same as File rename mask, or do you really want one set of files to albumArtist - TrackNo and the other half TrackNo - Artist.
I think if you study this it should be quite self explanatory what is going on.