Amarok/Manual/Organization/CollectionScanning

From KDE UserBase Wiki
Revision as of 14:09, 17 January 2011 by Rengels (talk | contribs) (first version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Every time Amarok is displaying a collection the information about tracks and albums needs to come from a source. The source can be an ipod, an internet service or a database. For tracks that are stored on the file system Amarok is using a database to have fast access to the required meta information. At first this information needs to be imported into the database which is usually done by scanning the collection directories for audio files. This process is called collection scanning.

It is useful to understand the scanning process in order to work better with Amarok.

Incremental Scan / Update Collection

The so called incremental scan will check the collection directories for updates. This is usually done every minute but can also be triggered manually by selecting "Update Collection" from the menu.

The incremental scan will just check the modification date of every folder in the collection against the last known modification time. This has a couple of implications: - You can trigger a rescan of one directory by modifying it's time (e.g. via "touch") - If files inside a directory are changed the scanner will not notice that (as changing a file does only update it's modification time but not the time of the parent folder). - If the collection folders are on a very slow partition the process of just checking all the modification times can take some time. Usually this information is cached by the operating system but with large collections that might not be possible. In such a case the scanner might appear to scan continuously.

With collections above 5000 tracks or when collections are stored on a network drive or an NTFS partition it is recommended to switch off the "watch folders for change" option.

Progress bar / scanning time

The progress bar will show the progress of the scanning. Up to 50% the scanner will scan the file system and just buffer the result. Times above 50% indicate that the scanner is committing the results to the database. Usually the second step is much faster than the first so don't be surprised if the progress bar seems to jump. Up to 50% aborting the scan is possible. After 50% the commiting of the files can not be stopped.

The scanning time depend on your disk speed and other factors. Usually the first scan is a lot slower than subsequent scans where the files are cached by the operating system. A scan of 10000 files should take around three minutes on a modern computer. 50000 files should be around 13 minutes.

Backup of collection

With the default settings Amarok is storing all the collection information in a directory called ~.kde/share/apps/amarok/mysqle/ It can be a good idea to make a backup of this directory from time to time, especially when you didn't enable the writing back of statistics information.