blob: 8f7a942eb6f8c94c0d85dedf0fc17be0363050f9 [file] [log] [blame]
Dominik Riebelingc75a8442006-04-04 21:48:47 +00001% $Id$ %
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +00002\section{\label{ref:database}Database}
Dominik Riebelingc75a8442006-04-04 21:48:47 +00003
4\subsection{Introduction}
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +00005This chapter describes the Rockbox music database system. Using the information
Nils Wallménius86171f22006-09-03 16:43:06 +00006contained in the tags (ID3v1, ID3v2%
7 \opt{SWCODEC}{, Vorbis Comments, Apev2, etc.}%
8) in your audio files, Rockbox builds and maintains a database of the music
9files on your player and allows you to browse them by Artist, Album and Genre.
Dominik Riebelingc75a8442006-04-04 21:48:47 +000010
Steve Bavin20d8e8d2007-03-15 13:03:37 +000011\subsection{Initializing the database}
Dominik Riebeling97f21462007-03-14 22:16:27 +000012The first time you use the database, Rockbox will scan your disk for audio files.
13This can take quite a while depending on the number of files on your \dap{}.
14This scan happens in the background, so you can choose to return to the
15Main Menu and continue to listen to music.
16If you shut down your player, the scan will continue next time you turn it on.
17After the scan is finished you may be prompted to restart your \dap{} before
18you can use the database.
Dominik Riebelingc75a8442006-04-04 21:48:47 +000019
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000020\subsection{\label{ref:databasemenu}The Database Menu}
Michael DiFebbo642d74d2006-07-27 02:02:18 +000021
Martin Arver85709112006-08-15 10:53:14 +000022\begin{description}
23 \opt{SWCODEC}{
Dominik Riebeling05978262006-09-17 20:48:56 +000024 \item[Load To Ram.]
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000025 The database can either be kept on disk (to save memory), or
Martin Arver85709112006-08-15 10:53:14 +000026 loaded into RAM (for fast browsing). Setting this to \setting{Yes} loads
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000027 the database to RAM, allowing faster browsing and searching. Setting this
28 option to \setting{No} keeps the database on the disk, meaning slower
Martin Arver85709112006-08-15 10:53:14 +000029 browsing but it does not use extra RAM and saves some battery on boot up.
30
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000031 \note{If you browse your music frequently using the database, you should
32 load to RAM, as this will reduce the overall battery consumption because
33 the disk will not need to spin on each search.}
Martin Arver85709112006-08-15 10:53:14 +000034 }
35
Dominik Riebeling05978262006-09-17 20:48:56 +000036\item[Auto Update.]
Martin Arver85709112006-08-15 10:53:14 +000037 If \setting{Auto update} is set to \setting{on}, each time the \dap{}
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000038 boots, the database will automatically be updated.
Nils Wallménius86171f22006-09-03 16:43:06 +000039 \opt{SWCODEC}{
40 \note{The \setting{Auto Update} will only check for deleted files if the
Nils Wallménius909b9462007-03-03 00:07:31 +000041 \setting{Directory Cache} (\setting{Settings $\rightarrow$ General
42 Settings $\rightarrow$ System $\rightarrow$ Disk $\rightarrow$
43 Directory Cache}) is enabled. \setting{Update now} includes that check
44 whether dircache has been enabled or not.}
Nils Wallménius86171f22006-09-03 16:43:06 +000045 }%
46 \opt{MASCODEC}{\setting{Auto Update} does not detect deleted files. To remove
47 deleted files from the database you need to run \setting{Update Now}.}%
48
Steve Bavin20d8e8d2007-03-15 13:03:37 +000049\item[Initialize Now.]
Dominik Riebeling97f21462007-03-14 22:16:27 +000050 You can force Rockbox to rescan your disk for tagged files by
Steve Bavin20d8e8d2007-03-15 13:03:37 +000051 using the \setting{Initialize Now} function in the \setting{Database
Nils Wallménius86171f22006-09-03 16:43:06 +000052 Menu}.
Steve Bavin20d8e8d2007-03-15 13:03:37 +000053 \warn{\setting{Initialize Now} removes all database files (removing
Nils Wallménius86171f22006-09-03 16:43:06 +000054 runtimedb data also) and rebuilds the database from scratch.}
Nils Wallménius86171f22006-09-03 16:43:06 +000055
Dominik Riebeling05978262006-09-17 20:48:56 +000056\item[Update Now.]
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000057 \setting{Update now} causes the database to detect new and deleted files
Nils Wallménius86171f22006-09-03 16:43:06 +000058 \opt{SWCODEC}{
59 \note{Unlike the \setting{Auto Update} function, \setting{Update Now}
60 will update the database regardless of whether the \setting{Directory Cache}
61 is enabled. Thus, an update using \setting{Update now} may take a long
62 time.
63 }
64 }
Steve Bavin20d8e8d2007-03-15 13:03:37 +000065 Unlike \setting{Initialize Now}, the \setting{Update Now} function
Martin Arver85709112006-08-15 10:53:14 +000066 does not remove runtime database information.
67
Robert Kukla226cb7b2007-03-26 15:08:59 +000068\item[Gather Runtime Data.]
69 When enabled, rockbox will record how often and how long a track is being played,
70 when it was last played and its rating. This information can be displayed in
71 the WPS and is used in the database browser to, for example, show the most played,
72 unplayed and most recently played tracks.
Martin Arver85709112006-08-15 10:53:14 +000073
Dominik Riebeling05978262006-09-17 20:48:56 +000074\item[Export modifications.]
Dominik Riebeling2e508af2007-03-07 15:44:03 +000075 This allows for the runtime data to be exported to the file \\
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000076 \fname{/.rockbox/database\_changelog.txt}, which backs up the runtime data in
77 ASCII format. This is needed when database structures change, because new
78 code cannot read old database code. But, all modifications
79 exported to ASCII format should be readable by all database versions.
Martin Arver85709112006-08-15 10:53:14 +000080
Dominik Riebeling05978262006-09-17 20:48:56 +000081\item[Import modifications.]
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000082 Allows the \fname{/.rockbox/database\_changelog.txt} backup to be
Dominik Riebeling2e508af2007-03-07 15:44:03 +000083 conveniently loaded into the database. If \setting{Auto Update} is
Steve Bavin20d8e8d2007-03-15 13:03:37 +000084 enabled this is performed automatically when the database is initialized.
Martin Arver85709112006-08-15 10:53:14 +000085
86\end{description}
Michael DiFebbo642d74d2006-07-27 02:02:18 +000087
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000088\subsection{Using the database}
Steve Bavin20d8e8d2007-03-15 13:03:37 +000089Once the database has been initialized, you can browse your music by Artist,
Nils Wallménius909b9462007-03-03 00:07:31 +000090Album, Genre and Song Name. To use the database, go to the \setting{Main Menu}
91and select \setting{Database}.\\
Michael DiFebbo642d74d2006-07-27 02:02:18 +000092
93\note{You may need to increase the value of the \setting{Max files in dir
Nils Wallménius909b9462007-03-03 00:07:31 +000094browser} setting (\setting{Settings $\rightarrow$ General Settings
95$\rightarrow$ System $\rightarrow$ Limits}) in order to view long lists of
96tracks in the ID3 database browser.\\
Michael DiFebbo642d74d2006-07-27 02:02:18 +000097
Jonas Häggqvist6b1d2cb2006-11-25 09:42:06 +000098There is no option to turn off database completely. If you do not want
Michael DiFebbo642d74d2006-07-27 02:02:18 +000099to use it just don't do the initial build of the database and do not load it
Dominik Riebelinga18bd162006-04-20 16:44:26 +0000100to RAM.}
101%
Dominik Riebelingc75a8442006-04-04 21:48:47 +0000102\begin{table}
103\begin{center}
Dominik Riebeling05978262006-09-17 20:48:56 +0000104 \begin{tabularx}{.75\textwidth}{XX}%
105 \toprule%
106 \textbf{Supported Tags} & \textbf{Unsupported Tags} \\
Dominik Riebelingc75a8442006-04-04 21:48:47 +0000107 \midrule
108 Artist & Comment \\
109 Album & Performer\\
110 Bitrate & \\
111 Composer & \\
112 Genre & \\
113 Length & \\
114 Title & \\
115 Track Number & \\
116 \bottomrule
117 \end{tabularx}
118\end{center}
119\end{table}