ALAC Tagging

Hi,
I tried mapping %_format% to keep only the ALAC term.
with the following script:
$if($eq(%_format%,MPEG-4 AUDIO (ALAC)),$set(%_format%,ALAC))
Its not working.

Try removing the percent symbols in your $set() statement, and escaping the brackets in the comparison string, something like:

$if($eq(%_format%,MPEG-4 AUDIO \(ALAC\)),$set(_format,ALAC))
2 Likes

Still not working. Thanks

_format is a read-only value determined by how the actual file is encoded. It is NOT stored as a tag. If it started out encoded as "MPEG-4 AUDIO (ALAC)` then changing the text doesn’t make any sense.

My goal is to rename my folders like ALAC - 24bits - 96khz.Maybe there is other option.

Perhaps you can try saving the information to a new variable, and use that in your file naming script. Something like:

$set(_audio_format,$if2(%_format%,Unknown))
$if($in(%_audio_format%,ALAC),$set(_audio_format,ALAC))

You would then use your new variable %_audio_format% in your file naming script where you currently use %_format%.

i will try it tonight. i start enjoying scripting !
Thanks

Just be careful when you use file=specific information in the directory part of your file naming script.

If you have a release which is a mixture of ALAC files and some other encoding, then you will have your files for a single release spread amongst several directories.

LOL…i already faced this situation. I converted everythings to ALAC when its Lossless and the rest is MP3 when the source is low quality. With ALAC the rest of the familly using ipads are happy. If i am alone in the house, i can stick with FLAC.

Here is my artisanal script (this is my 1st script !!!) Maybe i have chance at Ubisoft LOL…

$set(media_codec,%_extension% - %_bits_per_sample%Bits - %_sample_rate%Hz))

$if($eq(%_extension%,mp3),$set(media_codec,%_extension% - %_bitrate%Kbps - %_sample_rate%Hz))

$if($eq(%_extension%,m4a),$set(media_codec,%_format% - %_bits_per_sample%Bits - %_sample_rate%Hz))

$if($in(%_format%,ALAC),$set(media_codec,ALAC - %_bits_per_sample%Bits - %_sample_rate%Hz))

$set(media_codec,$upper(%media_codec%))

Sophist, i will take your advise and keep the codec info only at file naming not folder then they will stay togheter if many format use in a same album. Now question how do you handle the hyphen when no value is return as exemple :
If there is only a subtitle available for disc 2/2. the result for Disc 1 is : Disc 1 - /01 - Track
There is an annoying hyphen.

$if2(%albumartist%,%artist% - )/

$if2(%date% - )

$if2(%album% - )

$if2(%releasetype% Album)/

$if($gt(%totaldiscs%,1), Disc %discnumber% - %discsubtitle%/)

$num(%tracknumber%,2 - )(%title%)( - %media_codec%)