PutPinfInItsPlace
=================

Release 1, 9 June 2007.
Joshua King

Find more information about this tool at:
http://techtransit.blogspot.com

This is a simple tool to fix a compatibility issue between Apple iTunes Plus AAC music tracks and Nokia/Symbian mobile phones.

It may also be useful for other devices not currently able to play iTunes Plus.

Background
----------

iTunes 7.2 changed the layout of part of the .m4a audio format with the introduction of DRM-free music tracks to the iTunes Store and this has caused some players not to be able to play the files.

The issue is that the pinf atom which QuickTime Pro and other tools place as a child of the esds atom is now placed instead as a sibling.

This tool undoes this change in files where the tool detects this to be the case in order to prefer compatibility over iTunes-specific handling. This is fully lossless and reversable (should I or someone else write a tool to undo my change).

iTunes 7.2 will continue to play these tracks and no metadata is lost, with the exception of iTunes' ability to remember that a fixed track was purchased at the iTunes Store. (The Kind becomes "AAC audio file" instead of "Purchased AAC audio file" and the purchaser's name is hidden).

THIS TOOL DOES NOT REMOVE YOUR PERSONALLY IDENTIFIABLE INFORMATION FROM THE FILE!
(As Apple says, Don't steal music.)

Requirements
------------

iTunes for Windows/Mac 7.2 or later
iTunes Plus songs downloaded from the iTunes Store
Java 1.5 (J2SE 5.0) or later
	(Mac OS X users - get this from Software Update, Windows users from http://www.java.com)
Twice as much disk space as the songs currently take up for the backup files
A device such as a Nokia phone to play the fixed tracks on

Usage
-----

Locate your iTunes Plus tracks in your library and make a note of their names. You may want to create a Smart Playlist in iTunes for this purpose. This will need the criteria "Kind contains 'Purchased AAC'".

Run the tool -- you should simply be able to double-click PutPinfInItsPlace.jar.

Read the introductory message and click OK.

Navigate to your first set of iTunes Plus songs. You may select more than one song at a time, however you cannot select songs from multiple folders, so you will likely convert one album at a time. Select in the usual way, by clicking, shift-clicking, etc.

Click the Fix button.

Each song will be processed in turn.

First the song will be backed up - if this fails a message will be displayed. Check that you aren't using a read-only folder, and that you have permissions and enough disk space for the copy.

Next the tool will walk through the file looking for the incorrect bytes. If they are found, it is fixed, otherwise the file is simply duplicated. An error here indicates either you are trying to convert an incomplete file (for example a song that hasn't downloaded fully from the iTunes Store) or that there is an unhandled case in my code. I'd like to hear about these, so please leave me a comment or send me an e-mail.

The tool will then report success or failure of the fix, and move on to the next file.

The tool exits when all of the files have been fixed (or attempted).

Note that the tool prevents you from selecting/fixing files that appear to already been fixed (those that appear to have a backup already).

After testing the songs on your players, you can delete the backed-up .purchased.m4a files should you choose.

Testing
-------

The tool has been tested with Apple iTunes 7.2 (Mac Os X) on Mac OS X Tiger 10.4.9.

The songs were downloaded from the Australian iTunes Store.

The fixed songs were tested in both iTunes and a Nokia E61 mobile phone.

Reporting Issues
----------------

Please leave comments on my blog, or e-mail me with issues to jking_ok@yahoo.com.au.

Please do not offer to send me copyrighted files (ie, files from the iTunes Store). If there are files that the tool doesn't fix, please run the tool in the Terminal/Command Prompt (where an error should be printed) and run Atomic Parsley (http://atomicparsley.sourceforge.net) with the -T option on the file and send me that instead.

Joshua King
