# The gtkpod Manual

This is the user manual for gtkpod, a GTK+ iPod manager.

This is the user manual for gtkpod, a GTK+ iPod manager.

2007 gtkpod wiki contributors

Legal Notices

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.2 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual.

## Getting started

### Hooking up the iPod

#### Introduction

The iPod has largely been an USB device yet there are older models of iPods that used IEEE1394/ / firewire for their connection interface. Historically, it took something of an effort for linux to recognise the iPod model correctly. However, this situation has greatly improved in recent times where it is now possible to simply plug the iPod into a USB port and have your distro recognise it straight off.

gtkpod first and foremost relies on the successful mounting of a recognised iPod. Thus, if the iPod cannot be mounted then gtkpod is NOT going to do it for you! Thus, before firing up gtkpod make sure you can see the filesystem of your iPod at its desginated mount point, eg. /media/ipod.

#### Using udev

For linux distros installed with hal and udev, plugging an ipod in and mounting it becomes a trivial exercise. A device node will normally be created under /dev, eg. /dev/sdc.

Using udev rules it is possible to "play" and refine this device node to reflect personal requirements. For example, including these udev rules will allow 2 ipods to be loaded at the same time without interfering with one another:

                        #80GB IPOD
    SUBSYSTEMS=="usb", ATTRS{serial}=="000A2700XXXXXXXX", KERNEL=="sd?2", \
    NAME="80gbipod", MODE="0664", OPTIONS="last_rule"

    #4GB IPOD NANO
    SUBSYSTEMS=="usb", ATTRS{serial}=="000A2700YYYYYYYY", KERNEL=="sd?2", \
    NAME="4gbnano", MODE="0664", OPTIONS="last_rule"

By including the test against the serial number it is possible to uniquely identify an individual iPod and load it appropriately.

#### Mounting

The result of this is that the ipod will be located on a device node and this can be mounted manually using the command (performed as root):

    mount /dev/sdc2 /media/ipod

This assumes an iPod is loaded onto the device /dev/sdc and that it is a 2 partition model. It seems that post-2006, iPods have become 1-partition items.

However, it should be noted that moden window managers such as gnome and kde take on the responsibility of managing connected devices. Thus, the result of connecting an iPod will be an icon on the desktop which will either be mounted automatically or can be mounted by the user with a click of the mouse on a popup menu.

#### Environment variables

The following environment variables can be set if needed:

- IPOD_MOUNTPOINT: Defines the mountpoint of the iPod. This overwrites the value stored in the preferences, but is overwritten by the command line argument "-m" or "--mountpoint".
- GTKPOD_DF_COMMAND: Only used on systems without statvfs(). Defines the "df" command to be used for probing the free space on the iPod including command line arguments. Default is "df -k -P". On some systems it may be necessary to remove the "-P" option. The mount point is added to this command line automatically. You can switch off calls to df by setting this environment variable to an empty string.

### Setting iPod properties

#### 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.

#### Changing Preferences

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

#### 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.

#### 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.

#### 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.

#### 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.

#### 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.

### Troubleshooting FAQ

#### Contents:

- My iPhone or iTouch doesnt have a USB connection. How can I mount it on my linux box?

- My iPod is an iPhone, iTouch, Classic or nano3g. My tunes show up in gtkpod but I see nothing on the iPod when I eject?

- Installed libmp4v2 or libgpod from source to /usr/local/lib, but gtkpod is unable to locate libmp4.so.0 or libgpod.so.0

- Files copied to gtkpod but they don't appear in the database (0.80, Tony Williams)

- Filenames on the iPod appear in DOS 8.3 format and syncing to the iPod is not working as expected.

- ./autogen.sh does not work

- The following error message is displayed when accessing the device (Markus Gaugusch, Justin Thiessen):

      ** ieee1394: sbp2: aborting sbp2 command
      ** Test Unit Ready 00 00 00 00 00

- The following error message is displayed when accessing the device (Ingo Reimann)

      ** usb-storage: Attempting to get CSW...
      ** usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
      ** usb-storage: Status code -75; transferred 0/13

- When connecting an iPod via USB to a 2.6 kernel machine the iPod will be recognized but not work correctly. In /var/log/messages you'll see the a bunch of "Buffer I/O error on device sd?" when connecting the iPod (Jonas Bergler, Kevin Venkiteswaran)

- SHUFFLE won't play music after reformatting (Mark Davis)

- Calendar entries mixed up

- m4a files created by faac cannot be added by gtkpod (gentoo)

- gtkpod crashes when reading the iTunesDB (Fedora)

- Problems connecting the iPod to Solaris/SPARC

My iPhone or iTouch doesnt have a USB connection. How can I mount it on my linux box?

Solution:

The iPhone or iTouch, at present has to be mounted using sshfs.

My iPod is an iPhone, iTouch, Classic or Nano3g. My tunes show up in gtkpod but I see nothing on the iPod when I eject?

Solution:

This is to do with requiring your iPod model number in a sysinfo file located on the iPod. Please see here for details.

Installed libmp4v2 or libgpod from source to /usr/local/lib, but gtkpod is unable to locate libmp4.so.0 or libgpod.so.0?

Solution:

If you install to /usr/local/lib please don't forget to add the path to LD_LIBRARY_PATH:

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export LD_LIBRARY_PATH

You can add those lines to your ~/.bashrc or add it globally to /etc/profile.

Files copied to gtkpod but they don't appear in the database (0.80, Tony Williams)?

I'm having a problem that I wonder if you've seen. I've setup gtkpod. launch it and add files. I can hear the ipod harddrive spin up. If I go onto the ipod directly I can see the space being used and can even see the new files on the ipod. However the ipod interface doesn't show the new files and gtkpod keeps telling me that there are orphaned files.

Solution:

I finally figured out the problem. In my fstab I had the filesystem set to 'auto' and it was mounting as msdos instead of vfat. I specified vfat in fstab and voila! I'm a happy happy man.

Filenames on the iPod appear in DOS 8.3 format and syncing to the iPod is not working as expected?

Solution: You need to specify "vfat" as file system type. How to do that depends on which way you use to mount the iPod -- see the README file for more details.

./autogen.sh does not work?

Solution:

A ubuntu user has reported that he had to set

    ACLOCAL_FLAGS=" -I /usr/share/aclocal/"

in order to get ./autogen.sh to work.

The following error message is displayed when accessing the device:

    ieee1394: sbp2: aborting sbp2 command
    Test Unit Ready 00 00 00 00 00

Solution:

(Markus Gaugusch): It is possible that hotplug and the "sg" support are not working well together. Try disabling "sg" support in the kernel configuration or unload the "sg" module if you are using modules.

(Justin Thiessen): Forcing the sbp2 module to serialized I/O seems (so far) to have solved the problem.

Ref.:

- http://www.netzwerk-aktiv.com/pub/doc/newsletters/linux1394-user/html/1676.html
- http://www.ubuntuforums.org/printthread.php?t=6678
- http://66.102.7.104/search?q=cache:Xh_gu43y6w8J:themikecam.com/newmikecam/blog/index.php/geek/2005/+ipod+serialize_io&hl=en

Looks like the driver is going to be set to default to serialized I/O in kernel 2.6.14, anyways.

http://linuxtoday.com/developer/2005093001026NWKNDV

The following error message is displayed when accessing the device

                        usb-storage: Attempting to get CSW...
    usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
    usb-storage: Status code -75; transferred 0/13

Solution (by Ingo Reimann):

I tried to use an iPod Mini with my nforce2-Board, kernel 2.6.14/2.6.15 debian sid and got messages like [above] in dmesg. /dev/sda appeared, but fdisk -l did not show anything

The solution, that i found in a discussion on http://kerneltrap.org/node/3844 was to unload ehci_hcd.

When connecting an iPod via USB to a 2.6 kernel machine the iPod wil be recognized but not work correctly. In /var/log/messages you'll see the a bunch of "Buffer I/O error on device sd?" when connecting the iPod (Jonas Bergler, Kevin Venkiteswaran)

Solution (by "jeffmock"):

Disable CONFIG_EFI_PARTITION (File Systems -> Partition Types -> Advanced Partition Selection -> EFI GUID Partition support) in your kernel configuration, recompile. Details can be found at http://www.linuxquestions.org/questions/showthread.php?postid=1197015#post1197015

Excerpt:

"This problem could potentially happen with both 2.4 and 2.6 kernels."

A longer story follows and perhaps someone can come up with a more sensible solution for the long run.

The iPod looks like a removable disk drive to the host computer. When it is attached to the computer, the mini iPod reports a capacity of 7999488 512-byte sectors (or about 4GB). This turns out to be wrong for whatever reason. The mini iPod only really has 7999376 sectors and it exaggerates by 112 sectors. The other quality of the iPod is that if the computer attempts to read a sector greater than the actual capacity but less than the reported capacity, the iPod will dutifully report an I/O error, but it won't respond to any future requests until you unplug/plug the iPod."

I followed the kernel recompile instructions for distro, disabled only the CONFIG_EFI_PARTITION option, and things ran perfectly for me afterwards. As indicated above, hopefully a better long-term solution will emerge soon."

(Jorg Schuler: it seems a patch was introduced in kernel version 2.6.10: "<phil@ipom.com> [PATCH] USB Storage: Add unusual_devs entry for iPod This patch adds an unusual_devs.h entry for the Apple iPod as it reports one too many sectors. The patch was submitted by Avi Kivity <avi@argo.co.il> and re-diffed by me.")

SHUFFLE won't play music after reformatting

Solution (by Mark Davis):

The SHUFFLE seems to care about the volume name which has to be "IPOD". Try to format as (replace /dev/sda1 with the appropriate device file for your SHUFFLE!):

    mkdosfs -F32 -n IPOD /dev/sda1

Calendar entries mixed up?

Solution:

The iPod does not appear to like times specified in UTC (indicated by a trailing 'Z'). KOrganizer seems to do this. If you know how to work around it let me know.

m4a files created by faac cannot be added by gtkpod (gentoo)?

Solution:

There appear to be some versions of faac that do not create 'good' m4a files. The problem could be solved under gentoo by using version 1.24. In order to make error tracking easier, more detailled error messages are displayed when tracks could not be added for any reason starting with version 0.91-CVS of gtkpod.

gtkpod crashes when reading the iTunesDB (Fedora)

Solution:

It appears that crashes were observed with kernel version 2.6.11-1.35_FC3. An upgrade to 2.6.12-1.1376_FC3 got rid of the problem. This was with gtkpod-0.94.0 and Athlon64 3000+.

After updating the firmware of a 1st-gen iPod nano**, crashes are also observed with Fedora Core 5, kernel 2.6.20-1.2320.fc5, gtkpod 0.99.4 (which worked with the previous firmware). Downloading, building, and installing gtkpod 0.99.10 and libgpod 0.6.0 solved the problem.

Problems connecting the iPod to Solaris/SPARC

Solution:

Current (as of 2006/03/30) versions of the Solaris pcfs SPARC driver have a bug where the correct filesystem/partition layout may not be recognized, and this is true for iPods. This prevents the iPod partition from being mounted on Solaris SPARC. In order to work around this, one must prevent pcfs from detecting the first FAT32 filesystem, forcing it to move on to the second one. This can be done by changing the filesystem identifier like so:

                        # dd if=/dev/rdsk/c3t0d0s2 of=/tmp/ipod.orig count=1
    # cp /tmp/ipod.orig /tmp/ipod.modified <edit /tmp/ipod.modified and change the first occurance of "FAT32" (at offset 0x52 for me) to something else like "CAT32">
    # dd if=/tmp/ipod.modified of=/dev/rdsk/c3t0d0s2 count=1

### The sysinfo file

Starting with the 2007 generation of iPods, libgpod needs an additional configuration step to correctly modify the iPod content. libgpod needs to know the so-called iPod "firewire id", otherwise the iPod won't recognize what libgpod wrote to it and will behave as if it's empty.

#### The iPhone and iTouch

##### Global Assumptions and Scope of this Tutorial

touch_ip -- denotes the IP address that is assigned to your iPod Touch (e.g. 192.168.0.27).

touch_media -- denotes the mount point to your iPod Touch (i.e. the directory the iPod is mounted on).

To make effective use of the following you have to jailbreak your iPod Touch first (in order to access it via SSH). This document won't go into detail on this topic. One possibility to do this using a computer that runs Microsoft Windows (XP) can be found at:

http://iphone.cricblogs.com/one-click-ipod-touch-jailbreak-for-windows-by-msbasher/

##### Compiling libgpod & gtkpod (subversion versions)

Install and compile libgpod and gtkpod from subversion. See `Compiling and Installing|here` for details.

Configure libgpod. The '--prefix' option will make sure that is not installed globally but locally within your home directory (note: replace '~' by the absolute path to your home directory):

    ~/libgpod$ ./autogen.sh --prefix=~/local

Otherwise make sure all dependencies are met ('gtk-doc' is a candidate likely to be missing, proper version of automake is another).

Repeat this process for gtkpod ('PKG_CONFIG_PATH' make sure it builds on the freshly compiled version of libgpod; again, replace '~' by absolute path to your home directory):

    ~/gtkpod$ PKG_CONFIG_PATH=~/local/lib/pkgconfig ./autogen.sh --prefix=~/local

    ~/gtkpod$ make && make install

Assuming that everything went well you should be able to start gtkpod:

    ~$ LD_LIBRARY_PATH=~/local/lib ~/local/bin/gtkpod

You won't be able to fully use it at this point so close it for now.

##### Determining the Firewire GUID

Connect your iPod Touch via USB (to your Linux machine) and issue the command:

    sudo lsusb -v | grep -i iSerial

This should print something similar to this:

    iSerial 3 fd98145617c113dc15ab151601001ff12354b139
    [ ... ]

The first 16 characters constitute the FirewireGUID, i.e. in this example the FwGUID is:

    fd98 1456 17c1 13dc

##### Making libgpod Aware of the Firewire GUID

Mount your iPod Touch via:

    sudo sshfs root@touch_ip:Media touch_media/ -o allow_other

Go to the directory 'iTunes_Control' and create (if it does not already exist) a directory named 'Device':

    ~/touch_media/iTunesControl$ mkdir Device; cd Device
    ~/touch_media/iTunesControl/Device$ echo "FirewireGuid: 0xfd98145617c113dc" > SysInfo

Test if libgpod is able to retrieve the FWGUID by changing into the 'tests' subdirectory of libgpod's source directory and runnning:

    ./test-firewire-id touch_media/

##### gtkpod Revisited

With your iPod Touch still mounted start up gtkpod once more:

    ~$ LD_LIBRARY_PATH=~/local/lib ~/local/bin/gtkpod

You should now be able to sync songs to your iPod Touch. After syncing is complete go into "Music" on your iPod Touch: The songs you have just synced won't show up at this point. To make them appear press and hold the "Home"-Button until the springboard is reloaded. Going to "Music" now will show your music.

Don't forget to unmount it after you're completely done.

Tutorial compiled by staciemonroe (tobias kreisel gmail com)

#### The Classic and Nano3g

There are two ways to set up the iPod to make libgpod able to find its firewire id.

The 1st one is mostly automated. First, make sure you have libsgutils installed before running configure/autogen.sh. If you built libgpod without it, install it and run configure/make/make install. You should now have an ipod-read-sysinfo-extended tool available. Run it with the iPod device path (eg /dev/sda) and the iPod mount point (eg /media/ipod) as arguments. This may require root privileges. ipod-read-sysinfo-extended will read an XMLfile from the iPod and write it as /media/ipod/iPod_Control/Device/SysInfoExtended. See http://ipodlinux.org/Device_Information for more details about the method used.

Having that file is enough for libgpod to figure out the iPod firewire id.

The 2nd method requires more manual intervention. First, you need to get your firewire id manually. To do that, run "sudo lsusb -v | grep -i Serial" (without the "") with your iPod plugged in, this should print a 16 character long string like 00A1234567891231. For an iPod Touch, this number will be much longer than 16 characters, the firewire ID is constituted by the first 16 characters. Once you have that number, create/edit /media/ipod/iPod_Control/Device/SysInfo (if your iPod is mounted at /media/ipod). Add to that file the line below:

    FirewireGuid: 0xffffffffffffffff

(replace ffffffffffffffff with the string you obtained at the previous step and don't forget the trailing 0x before the string)

Save that file, and you should be all set. Be careful when using apps which lets you manually specify which iPod model you own, they may overwrite that file when you do that. So if after doing that libgpod still seems to write invalid content to the iPod, double-check the content of that SysInfo file to make sure the FirewireGuid line you added isn't gone. If that happens, read it to the end of the file, and make sure libgpod rewrite the iPod content.

Once that is done, if you compiled libgpod from source, you can test that libgpod can find the firewire ID on your iPod by running

    libgpod/tests/test-firewire-id /ipod/mount/point

### iPod file recovery

#### Checking iPod's Files

For whatever reason -- it may happen that tracks are present in your iTunesDB that are no longer present on the iPod (dangling tracks), or that tracks are on the iPod but not in the iTunesDB (orphaned tracks). The function "Checking iPod's Files" under the "File" menu will identify both types and take the following actions:

##### Orphaned tracks

A new playlist "[Orphaned]" will be created with all orphaned tracks in it. The only exception are orphaned tracks that would become duplicates (if duplicate detection is activated). Those are marked for deletion with the next sync.

##### Dangling tracks

These tracks will be marked for deletion with the next sync unless the original PC file is still available. In that case you can have them restored with the next sync.

#### After a File System Error

If iPod's file system gets corrupted and you need to reformat your iPod, there is a way to restore the contents semi-automatically if you have been using the "write extended information file" (iTunesDB.ext) options:

- If the directory structure on the iPod doesn't exist yet, load the iPod in gtkpod and have it created for you. Then unload the iPod again.

- Copy your backup files in .gtkpod/ (usually iTunesDB and iTunesDB.ext) to your iPod (usually <mountpoint>/iPod_Control/iTunes/

- On the iPod the files must be named iTunesDB and iTunesDB.ext.

- Load the iPod in gtkpod.

- Select the iPod repository and start "Check iPod's files" from the File menu.

- Unload the iPod (or save changes).

This should restore your iPod to what it was before, provided you didn't move or remove any of the original tracks on your harddrive, and the charset information was stored correctly.

## iPod and content

### Layout of gtkpod

Typical layout of gtkpod

#### What is a Repository?

The left hand pane in gtkpod displays all the repositories that have been created. A repository is (like it implies) a collection of all music tracks, videos and photographs imported into it. They are associated together by a binary XML database file that is the same format as the one that sits on an iPod.

By default, gtkpod creates a Local repository and a Podcast Repository. These sit on the computer with gtkpod (they can be found under the ~/.gtkpod directory). By having a local repository, it is possible to import tracks into gtkpod without needing to copy them straight to an iPod. This means that if the cover art, for example, needs to be changed then tracks can be managed without even having the iPod plugged in.

Of course, gtkpod is pointless without accessing an iPod. In the same pane as the local repository, new iPod repositories can be created. These repositories related to iPods by model and mount point. Normally, one repository is sufficient but as you can see below, it is possible to set up multiple iPod repositories on the same computer.

#### Repository Pane

- Below each repository, available playlists are listed along with a podcast playlist.

- Under iPods that support photographs, a special dynamic node is created that, when clicked, invokes the photo management tool. This allows straight addition of photos to the iPod as well as management of photo albums on the iPod. **Note:** this photo node cannot be deleted!! There is no point trying as it is created by gtkpod for the sole purpose of displaying the photo management tool.

#### Menus and Toolbar

- Menus across the top provide alternative access to the most frequently used functions.

- Toolbar provides the following actions:

  - Load iPod(s) -> used for manually mounting any iPods already set up in gtkpod

  - Save Changes -> vital button! The Save All function that save any changes made to loaded iPods or the local database.

  - Files -> Add individual music files to the selected repository.

  - Dirs -> Add any music files located in the selected directories to the selected repository.

  - Playlist -> Add a playlist file to the selected repository.

  - New PL -> Create a new playlist on the selected repository.

#### Filter Tabs

- The two notebooks above the track display are called "Filter Tabs".

- They allow you to filter which tracks are displayed.

- If you edit an entry in the filter tab, the corresponding entry in all associated tracks will be updated as well. When writing the tags to disk as well, updating of a large number of tracks may take a while.

- So in the image above, choosing "Alice Cooper" on the first filter tab and "Trash" on the second filter tab will only display the tracks from that most excellent of albums (no dissenting opinions required! ;-) ).

- Obviously, these filters can be altered to suit. Selecting ALL on a sort tab effectively removes the filter and displays all tracks.

#### Track Window

- Displays all tracks residing in the selected repository and conforming to the selected filters.

- The columns can be sorted and are interchangeable.

#### Cover Art Display

- Displays the cover art of all albums stored in the repository.

- If no cover art exists for an album then the default "?" image is displayed.

- See the Cover Art section for more information.

### Adding files and folders

#### Getting Tracks into gtkpod

- You can add individual tracks, entire directories recursively, or existing playlists using "Add Files". A file selection dialogue will appear. By default existing tracks (same full filename) will be skipped.

- You can add directories recursively using "Add Dirs". A directory selection dialogue will appear.

- You can add existing playlists using "Add Playlists"

- You can delete tracks by marking them and pressing the "Ctrl-d" . If you delete tracks from the master playlist (the topmost playlist, called "gtkpod" by default). You can also delete tracks by selecting them, and using "Delete Track" in the Edit menu or from the context menu.

- You can update ID3 tags of selected tracks in gtkpod from the mp3 file by pressing "Ctrl-u" or choose "Update track info from file" in the Edit menu or from the context menu.

- You can rename ID3 tags by editing the fields in gtkpod. You can change an entire group of ID3 tags by editing an entry in the sort tab (or mark several tracks and edit the first).

- You can specify which tags to display in the preferences window.

- You can specify (in the prefs window) if the ID3 tags of the corresponding mp3 file(s) should also be updated.

  The Add Folders dialog

- Can add music and video files invidually using Add Files.

- Can add directories of music and video file using Add Directories.

- The files are imported into the selected repository. If the selected repository is an iPod then the files will be copied directly onto it.

- See Supported File Types for types of files that can be imported.

  Note: gtkpod is an iPod management tool. Tracks, videos and photographs already need to be on the computer filesystem before they can be imported. If adding a CD is the requirement then it needs to be ripped first. Have a look at:

  - grip

  - Sound Juicer

  - kaudiocreator

#### Dragging and Dropping

- Once imported tracks can be dragged around gtkpod, including inbetween repositories, playlists, filter tabs and the track display pane.

- A drop onto an existing playlist will add the tracks to that playlist.

- A drop between two existing playlists or behind the last playlist will create a new playlist to which the tracks are added.

- The default action for the drop is either move or copy as appears appropriate (e.g. playlists are moved within a database ('local' or 'iPod/Shuffle'), but copied when dragged across different databases). The applicable action is displayed within the drag icon and can be changed by pressing the control key during the drop.

### View and edit track details

#### Edit Track Details

The Edit Track Details window can be displayed from a couple places.

- Select a track from the Track window, right-click and select "Edit Track Details" from the popup.

- Make a selection in any of the categories, eg. Album, Genre, and right-clicking "Edit Track Details will display the window and allow all tracks in that category to be edited.

- Right-clicking "Edit Track Details" from the popup menu on the CoverArt Display displays the window , allowing all tracks belonging to the album to be edited.

  The Edit Track Details dialog

- The window allows multiple tracks to be edited at the same time. By selecting the "Change all Tracks Simulaneously" check box **BEFORE** making any edits, all the selected tracks can be updated with the new information.

- The coverart can be dragged n dropped on from a web browser in the same way as the Cover Art Display. However, dropping a new cover onto this window will update the cover art of the tracks and not the album! This is an important distinction as it is possible to have different cover art for tracks in the same album! (why anyone would but its possible)!

#### Refresh (Update) Track Info From File

If you have changed the ID3 tags of your original file, you can update the ID3 tags stored in gtkpod without removing and re-adding the track. Simply select the track to be updated and press "Ctrl-u" or choose "Update Track Info From File" from the Edit menu. Since gtkpod needs to know the filename of the track, the "Extended Information File" (see here) is needed.

"Update" will also re-read the replay-gain tags from disk, if available, and set the soundcheck field. If no replay-gain tag is available, the soundcheck field will be erased. You can also select entries in the filter tab or entire playlists for refresh.

#### Synchronize with Directories

If you have added files to directories or changed files in directories you have previously added tracks from, you can use the "Synchronize Dirs" utility to update your iTunesDB.

"Synchronize with Dir(s)" will use the selected tracks to make a list of directories to update, so you should activate the "Write Extended Information" option in the export section of the Preferences dialogue.

It will then add all non-existing tracks in those directories and update all existing tracks. The tracks are also added to the currently selected playlist, if they aren't already a member.

Tracks that have been removed from the directory will only be removed from the iTunesDB if this option is checked in the option dialogue.

For best results you should also activate duplicate detection. This avoids unnecessary copying of unchanged tracks.

#### Volume Normalization

There are two fields in the iTunes Database (iTunesDB) that allow for the adjustment of the volume of an individual track:

- the volume field (a signed integer)

- the soundcheck field (in dB).

The volume is always active, whereas the soundcheck field is only active when you select 'soundcheck' on the iPod. Further, the soundcheck field only affects the earphone output but not the line output of the iPod.

gtkpod will set the soundcheck according to the replay-gain tag set in your mp3 file. Newer versions of 'lame' automatically include the replay-gain tag when encoding. In that case the soundcheck field will be filled in when you first import a track.

If no replay-gain tag is set, you can use the function 'Normalize Volume' to call mp3gain (mp3gain.sourceforge.net) to calculate the gain and write a replay-gain tag. Since this procedure is very time consuming, it is not done automatically during import. You need to install mp3gain in the default path or set the full path in the 'Tools' section of the preferences dialog. If the iPod is connected, the tag is written to the file stored on the iPod.

At this time "album gain" functionality is not supported. "Album gain" means that the volume of all tracks of one album is adjusted by the same gain, such that the relative volume level remains the same. It is planned to realize this in one of the next versions.

Also, please be aware that tracks are not normalized on a 'per playlist' fashion. If a track is normalized, it's normalized in all playlists it is a member of.

Once the replay-gain tag has been read, it is stored in the extended information file 'iTunesDB.ext'. When you call 'Normalize volume' again, the stored value will be used to re-populate the soundcheck field. Use 'Update Track' to re-read the tag from the file.

### Cover art

Cover art is a visual element of your gtkpod music collection. It changes the black and white database of artists and title names back into something related to the physical CDs and DVDs that have been imported.

#### The Clarity Display Plugin

Should you have the capability of an opengl rendering graphics card and drivers then the clarity plugin provides a more stylish cover art display than the original coverart display plugin described here.

#### CoverArt Display

The display consists of 9 covers displayed at any one time. The entire album collection can be cycled through from one end to another. The main image is slighly larger and lacking in "shine" for viewing clarity.

Cover art display

- Use the scrollbar to quickly slide back and forth over the album collection.

- Use the scrollbar buttons to more precisely step through each album.

- Click on the main album cover image (one at the front and in the centre) once to display just the album's tracks in the right pane of gtkpod

#### CoverArt Popup Menu

Cover art popup menu

- Right-click on the main album cover image to display the popup menu with 3 options:

  - Select Cover From File

  - View Full Size Artwork

  - Edit Track Details

##### Select Cover From File

Select cover from file

- Selecting this option displays a file chooser dialog. Select the preferred image file and click OK. The album cover changes to a scaled version of the new image, while all the tracks in the album have their artwork path modified to the path of the preferred image.

##### View Full Size Artwork

View full size artwork

- Selecting this options opens a dialog displaying the cover image. The image is either its true size of the biggest size it can be while still fitting on the desktop. Its true resolution is displayed underneath in the format width x height.

- The dialog is modal so must be closed before moving on. The OK button closes the dialog.

##### Edit Track Details

- This provides a shortcut to the "Edit Track Details" dialog for editing the ID3 tag information for all tracks belonging to the album displayed.

### Adding cover art from a browser

Unlike other applications, cover art in gtkpod is not hidden away in a "difficult to find" image cache. In fact, cover art files, for a local database, can be located anywhere on the filesystem.

#### Setting Image on Track Import

Locating the image file in the same directory as the tracks gives the additional benefit that gtkpod will analyse the image upon track import and set the image as the album's cover artwork. It is Important to ensure the image's filename corresponds to at least one of the image filename templates entered in the Preferences window.

#### Setting Image on Existing Album

The use of the popup menu to select a cover art file from the filesystem has been documented `Cover Art|here`. It is also possible to download a cover art image file from the internet and drag n drop it into gtkpod.

##### Drag 'n Drop Using Firefox

1. Locate the preferred image and display it in firefox.

2. Ensure the url of the image ends with ".jpg" or ".JPG" (other file extensions could be supported if demand warrants it).

3. Drag the image from Firefox and drop it onto the Cover Art Display's centre/main cover image. The main cover image should be displaying the album which requires the new cover.

4. If a cover already exists with the same filename then gtkpod will ask whether the existing image be overwritten or the new image be named something else.

5. The image will be downloaded from the url location, saved in the album's directory on the filesystem and applied to each track belonging to that album.

##### Drag 'n Drop Using Konqueror

- A limitation of the dnd in Firefox is that only the url can be used to get at the image file. Thus, the page must be displaying just the image and gtkpod must redownload the image internally (using curl and the image url).

- Konqueror offers the additional functionality that the image file can be extracted directly from its cache. This has the benefits of avoiding the internal curl download and that the url is not restricted to those ending in ".jpg"

- The importance of the latter benefit concerns websites that do not offer the direct download of cover art images. allcdcovers.com is one such site, where its images are displayed in the browser but the image url cannot be used a second time to download the same image. Thus, allcdcovers.com cannot be used as a download dnd source in Firefox. However, in Konqueror, simply open a full image from allcdcovers then just drag 'n drop into gtkpod.

- Maybe Firefox will do this some day too..

### Copying content to the iPod

#### Getting Tracks onto the iPod

- Tracks can be imported directly to an iPod by ensuring the latter is the selected repository before clicking Add Files or Add Directories.

- Normally though, tracks will already have been imported into the Local repository. To copy them onto the iPod simply select the tracks in the Track Window and drag them onto the iPod repository icon.

- To copy a whole album, selected the album in one of the sort tabs and drag that onto the iPod repository.

#### Playlists

- Use playlists to group together a set of tracks. Simply create a new playlist in the Local repository then drag n drop the tracks onto it.

- Tracks are not actually copied into a playlist so should a track be deleted then it will be deleted from all playlists.

- Drag n drop a playlist onto the iPod repository icon to copy it and all its tracks to the iPod. The playlist will be available in the Playlist section of the iPod's control system as well as all tracks being copied to the iPod.

#### Save Changes

- At any change to a repository, eg. track addition, deletion, edit ..., a change has occurred that requires a database save. To highlight this, the name of the repository is changed to italics, ie. Local -> Local. This shows the repository requires saving.

- Should gtkpod be closed prior to any saving then a dialog is displayed informing that data changes will be lost if a save is not performed.

- Clicking the "Save Changes" button will save all changes made to all of the repositories. This is the point where tracks are actually copied to the iPod and the iPod database updated. Only after a save is performed will the tracks copied to the iPod, be playable on the iPod.

### Playcounts and ratings

Whenever a track is played completely on the iPod (firmware version 1.3 or higher) a counter in the "Play Counts" file will be increased by one. The same file also contains the rating set with the 3rd generation (and later) iPods. This file appears to be deleted whenever the iPod resets itself, e.g. because the iPod is disconnected from the computer. Therefore, be careful! Charging the iPod seems to do no harm.

When gtkpod is started, it will also read this file and incorporate the information into the iTunesDB that can be written back to the iPod. There have been several requests to also register playcounts when playing a track on the local machine. This is possible by calling gtkpod as

    gtkpod -p <filename>

If gtkpod is already running, the playcount of that track there will be increased by one. If gtkpod is not already running, the playcount will be registered in ~/.gtkpod/offline_playcount. This file will be read the next time you import the iTunesDB from your iPod, and the playcounts will be updated accordingly.

Please note that if you start several instances of gtkpod, only the first instance will register playcounts through "gtkpod -p".

Now all that is required is to tell your favorite player to call gtkpod with the filename of the played track.

For xmms this is possible as of July 18th, 2004 (CVS version). Versions before that (including 1.2.10) only allow you to have an external program called at the beginning of a track. Our patch allows to have an external program called also at the end of a track.

In each case you will need to activate the "General Plugin" called "song_change" and configure it to call 'gtkpod -p "%f"'.

## Managing playlists

### Playlists, podcasts and photos

#### Playlists

Playlists reside under the iPod repository node in the left hand pane of gtkpod. Clicking on them will display the tracks associated with them, effectively filtering the other gtkpod panes. You can ...

- create playlists with the <New Playlist> button on the toolbar or pressing "Ctrl-n" in the playlist listview.

- create playlists by adding an existing playlist file with <Add file> or <Add playlist>.

- add tracks to playlists by marking the tracks you want to add, and then dragging them onto the playlist.

- rename playlists.

- delete playlists by selecting the desired playlist and pressing "Ctrl-D", or by selecting "Delete Playlist" from the Edit menu.

#### Podcasts

You have to download podcasts using a third party tool like bashpodder or gpodder .

Podcasts should be added directly into the 'Podcasts' playlist of the iPod repository, for example by selecting the Podcasts playlist before manually adding files/directories. Podcasts will then appear only in the Podcasts section on the iPod. If you add podcasts to the main playlist 'gtkpod/iPod' or any other iPod playlist first and then drag them over to the Podcasts playlist, the podcasts will appear in the Podcasts section on the iPod, as well as in the normal music section.

The podcast 'repository' is a local repository (like 'Local') where you can keep all local podcasts. No mechanism exists to automatically synchronize the iPod repository with the Podcast repository at this time. You have to drag the podcasts over manually.

#### Photos

If your ipod supports photos then a special dynamic playlist is created in the playlist tree. YOU CANNOT DELETE IT! Indeed when clicking on it all the usual track related ipod functions are disabled or removed.

- The track window elements are replaced with the photo management pane. This displays the Photo Library and all the saved photos from the ipod and allows you to add new albums, add new images, remove albums, remove images and drag n drop image between albums.

- You cannot delete the Photo Library as this is the original photo database. All images are stored in it and thus clicking on it, all the images on the ipod are displayed in it. Subsequent albums display a subset of the Photo Library's images.

- Removing an image from an album will remove it from the album but it will still be stored on the ipod in the Photo Library.

- Removing an image from the Photo Library will delete it completely from the ipod.

- You can select a set of images from a selected album (inc. the Photo Library) and drag n drop them into another album.

- Any changes made in the photo management window will change the Photo playlist to italics indicating that a "Save Changes" should occur before exiting in order to preserve those changes.

## Advanced features

### Exporting files from the iPod

#### Copying from the iPod

Unlike other iPod management applications, it is possible to copy tracks resident on the iPod back onto a PC, using gtkpod.

- Mark the tracks you want to export and select "Export Tracks from Database" from the file menu (or use the context sensitive menu).

- A file selection dialog window appears and you can choose the directory you'd like the selected files to be written to.

- You can specify the output filename in the prefs dialog by specifying a template (e.g. "%A/%a - %t"). You can specify multiple templates for different file formats by separating them by a semicolon (e.g. "%A/%a - %t.mp3;%t.wav"). See the tooltip in the preferences window for a list of identifiers.