Setting iPod properties

1.2.1. Preferences File

On startup gtkpod will read the preferences from ~/.gtkpod/prefs (or /etc/gtkpod/prefs if the former doesn't exist). The file is created if preferences are changed using the Preference window.

1.2.2. Changing Preferences

Preferences can be changed by opending the Preference window. This is displayed by clicking on Edit > Edit Preferences or hitting Ctrl+P.

1.2.3. Duplicate Detection

You can instruct gtkpod (in the prefs window) to use file-size-dependent SHA1 checksums to prevent the same file from being copied to your iPod twice.

If a duplicate is detected, gtkpod will print out the the filenames of the duplicate files. If the filename of the already existing file is not available (it is not stored in the iTunes database, see "Extended Information File" below), other available information of the track is printed.

1.2.4. Extended Information File

Some (I believe) essential information is not stored in Apple's iTunes database. You can therefore instruct gtkpod to write an additional file (iTunesDB.ext) with extended information. For each track it stores

  • SHA1 hash
  • filename in the locale's encoding
  • filename in UTF8 encoding
  • hostname where the file was added (not used for anything yet)
  • filename of an associated converted file (for example an .mp3 for a .flac file)
  • if the file is present in the local database a reference to there
  • in order for playcounts to work on the local database as well
  • last modification time
  • the charset used for the file when adding it

Since the extended information file is only valid with the corresponding standard iTunes database, a checksum of the iTunes database is also stored in the extended information file.

Using an extended information file will considerably speed up the import of an existing iTunes database when using duplicate detection, since the SHA1 checksums do not have to be re-calculated.

Using an extended information file will also allow modification of ID3 tags in the track files after the initial import, because the full filenames are still available.

1.2.5. Encoding of ID3 tags (charsets)

If you use correctly written unicode ID3V2 tags you don't have to worry about the charset setting. Otherwise you must specify the charset to be used for representing ID3 tags in the preferences menu. The default is "System Charset", which is the charset associated with the locale gtkpod is running under. If your tags are stored in a different encoding, you should set it appropriately.

Please note that if necessary you can change the charset each time you add files or directories: the iTunesDB itself is using UTF16, so once tags are imported correctly, changing the charset has no influence.

If you chose "Japanese (automatic detection)", gtkpod will try to determine if the string is in ISO-2022-JP, Shift_JIS, or EUC-JP (Hankaku Katakana (1-byte Katakana) may not be recognized correctly -- specify the correct encoding if you run into this problem). The actual encoding used for the ID tags will be stored and will be used when writing tags or doing updates/syncs. Check the "Use selected charset also when updating or syncing tracks" and "Use selected charset when writing tags" options if you want to specify a particular character set when writing or updating/syncing. The default charset is "EUC-JP" -- it will be used when the charset cannot be autodetected, as well as when writing tags if a specific charset could not be determined before.

gtkpod will recognize ID3V2 tags encoded in unicode automatically and ignore your charset setting when necessary.

1.2.6. Extracting tag information from the filename

Tags can also be extracted from the filename if you activate the option 'Use this template to parse filename for tag information' and supply a template that explains how the filenames are constructed.

For filenames like code music/new/latin1/alan_jackson - drive/01 drive_for_daddy_gene.mp3 code you could use code %a - %A/%T %*.mp3 code to extract artist, album, track number and title.

The following character sequences are supported:

  • %t: title
  • %a: artist
  • %A: album
  • %c: composer
  • %t: title
  • %g: genre
  • %T: track number
  • %C: CD number
  • %*: placeholder, ignore data
  • %%: the character '%'

You cannot supply a template like "%a%t.mp3" because gtkpod would not know how to separate artist and title. "%a_%t.mp3" would be correct, if artist and title are separated by an underscore. You can also omit the trailing ".mp3" if you want the template to apply to all files instead of only to mp3 files.

1.2.7. Startup and Shutdown Scripts

During startup and after reading the preferences file, gtkpod will try to execute

~/.gtkpod/gtkpod.in or /etc/gtkpod/gtkpod.in
Just before exiting the program, gtkpod will try to execute
~/.gtkpod/gtkpod.out or /etc/gtkpod/gtkpod.out
Thus, extra arguments can be entered into these scripts and gtkpod will run them. An example of this could be uploading data to last.fm.