Script Help with Adding Bitrate to Folder

Thanks for the clarification. Some of the code was left overly simple just to work through the immediate issue, and I’ll be working on cleaning it up. However, one of your suggestions does not work.

$if($gte(%_numbr%,220),$set(_folderbr,V0),
$if($lt(%_numbr%,220),$set(_folderbr,V2),

Fine.

$if(%_folderbr%,,

Fine as well, thank you. Couldn’t figure out the expected syntax for just checking whether a variable was empty.

$set(_numbr,$div(%_bitrate%,1000))

This won’t work in the current build. Here’s the complete script, if you’d like to review that.

$if2(%albumartistsort%,%artistsort%)/
$if($ne(%albumartistsort%,),
%artist% - 
%date% - 
%album% {%label% %catalognumber%}  
[
$noop($set(_numbr,$left(%_bitrate%,3)))
$set(_numbr,$div(%_bitrate%,1000))
$upper(%_extension%)
$if($eq(%_bitrate%,320.0),$set(_folderbr,320),
$if($eq(%_bitrate%,256.0),$set(_folderbr,256),
$if($eq(%_bitrate%,192.0),$set(_folderbr,192),
$if($eq(%_bitrate%,160.0),$set(_folderbr,160),
$if($eq(%_bitrate%,128.0),$set(_folderbr,128))))))

$if(%_folderbr%,,
$if($gte(%_numbr%,220),$set(_folderbr,V0),
$if($lt(%_numbr%,220),$set(_folderbr,V2),
$set(_folderbr,Err)
)))
$if($eq($upper(%_extension%),MP3), %_folderbr%)
]/)$if($gt(%totaldiscs%,1),%discnumber%,)$if($ne(%albumartist%,),$num(%tracknumber%,2). ,)$if(%_multiartist%,%artist% - ,)%title%

If you try it as is, a VBR MP3 will get tagged as [MP3 Err]. If you noop the line with $div and un-noop the line with $left it’ll work.

4 Likes