This project is read-only.

How this program works

First, a few terms need to be defined.

A server is merely a normal computer that contains audio files and executes foobar2000. Additionally, COM Automation server for foobar2000 is required.

A mobile device is a device that can play MP3 files and be mounted to a drive or a folder. For example, when I connect my Palm Pre, a mobile device, to a server, a new I: drive is assigned, and I can access Palm Pre’s files through I: drive.
Although Volkswagen Rabbit 2007 built in audio cannot be directly connected to servers, I’ll consider it as a mobile device because I can create a dedicated folder and consider that folder as a mobile device. With any CD burning software, users can burn a data CD from that folder.

A playlist is a term used in foobar2000, which implies playlists exist in a server. A playlist consists of audio files. In this program, a playlist is the unit of synchronization; one mobile device should have one corresponding playlist.

Communicate with a mobile device

As the definition of a mobile device states, a mobile device should be mapped to a drive or a folder so that this program can access mobile device’s files as it accesses a normal file.

If a mobile device cannot be connected to a server or mapped to a drive or a folder, one can create a folder that is dedicated to this mobile device. Then, this program will synchronize with this dedicated folder, and you can copy or burn that folder outside of this program, later.

Communicate with a server

When an instance of foobar2000 with COM Automation server is running, this program can communicate with foobar2000 through COM interface. This program fetches list of audio files that belong to a selected playlist.

Compare a server with a mobile device

This program traverses audio files in the selected playlist, and checks if the mobile device has a file corresponding to that. If the mobile device has the corresponding file, that file is considered as up-to-date. Otherwise, that file is marked as dirty.

Additionally, this program can traverse audio files in the mobile device on demand and checks if the server has the source file. If the server does not have the source file, the file in the mobile device is marked as junky.

Currently, it just checks whether or not the corresponding file exists; comparing hash code or track information is not implemented. This method is simple, but this is not as simple as searching for files using Explorer because this program can change the file name or the directory structure according to the device's restriction.

Copy audio files to a mobile device

For each dirty audio file collected from the comparing stage, this program actually copies the file to the mobile device when "Copy to Device" command is issued. If needed, required conversions are performed to deal with mobile device’s restriction. Available conversions are as follows.
  • Transcoding: convert FLAC or OGG into MP3 as many devices do not support FLAC or OGG
  • Artwork: embed an artwork in a MP3 file as some devices do not recognize external image files
  • Directory structure: flatten the directory structure as some devices do not thoroughly traverse directories
  • Hangul: Romanize Hangul (Korean alphabet) as some devices only accept the Roman alphabet

Note that this conversion is non-destructive in the sense that the audio file in the server is not modified. A clone of that file is created and conversion is performed on the created file.

Copying an audio file to a mobile device is achieved by a usual file copy operation given that the mobile device was mounted to a drive or a folder.

Remove audio files from a mobile device

For each junky audio file collected from the comparing stage, this program deletes junky files.

There are some cases that a mobile device has audio files that the server does not have.
  • The server removed a file or renamed a file.
  • The mobile device downloaded a file, or did some file operation like renaming.

Regardless of the reason, this program consider those files junks, and users can delete junks by issuing "Remove Junk" command.

Last edited Aug 5, 2009 at 5:15 AM by linjus, version 1


No comments yet.