Compare iTunes Values

Unfortunately, it is not impossible that values in an iTunes library differ from the values stored in audio files. Historically, this was caused when iTunes did not properly update the files, especially WAV files. This can also happen if you make changes to your files when you are not linked to iTunes.

Two actions are provided. Get iTunes Values is an action which obtains iTunes values and is intended to be called by another action. Compare Current Values with Values in iTunes is a sample use of Get iTunes Values which displays differences, if any, between the values in the iTunes library and those in the audio files.

----- Start of action 'Get iTunes Values'

'

This action imports 'base settings' from iTunes and preserves them in a list in Variable 1.

***** Warning: all changes made to a file before calling thus action will be lost. ***** The file will have a Revert executed against it.

e.g. after calling the action, extract the iTunes Title for a track. (Note that delimiter and separator are the default values).

Set named variable 'iTunes Title Value' to the value of case insensitive key 'Title' in the list field Variable 1 (delimiter "⏎" separator "≔")

Note that all files which are not linked to iTunes are ignored and will have their Variable 1 set to empty.

'

The Fields named variable is being initialized to the names of this Yate fields which can be read by Yate

Set named variable 'Fields' to "Title,Artist,Album Artist,Album,Year,Track,Track Count,Disc,Disc Count,BPM,Grouping,Composer,Comments,Genre,Part of a Compilation,Description,Sort Title,Sort Artist,Sort Album Artist,Sort Album,Sort Composer,Lyrics"

Post the path to the file and change the flag so we know that a fault was posted.

Set named variable 'Fault Posted' to "1"

Append "\n\!Path to File!\n" to named variable 'Results'

endif

'

Initialize named variable Data to the two different values. This could have been down directly on the Append statement, but doing it this way provides a multi line field where it is easier to layout the data.