Fix makefile conditions
[maemo-rb.git] / manual / rockbox_interface / tagcache.tex
blob35c7224b52b1c8a8b7bdb63a97bd195b30fc7ab0
1 % $Id$ %
2 \section{\label{ref:database}Database}
4 \subsection{Introduction}
5 This chapter describes the Rockbox music database system. Using the information
6 contained 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
9 files on your player and allows you to browse them by Artist, Album, Genre,
10 Song Name, etc. The criteria the database uses to sort the songs can be completely
11 customised. More information on how to achieve this can be found on the Rockbox
12 website at \wikilink{DataBase}.
14 \subsection{Initializing the Database}
15 The first time you use the database, Rockbox will scan your disk for audio files.
16 This can take quite a while depending on the number of files on your \dap{}.
17 This scan happens in the background, so you can choose to return to the
18 Main Menu and continue to listen to music.
19 If you shut down your player, the scan will continue next time you turn it on.
20 After the scan is finished you may be prompted to restart your \dap{} before
21 you can use the database.
23 \subsubsection{Ignoring Directories During Database Initialization}
25 You may have directories on your \dap{} whose contents should not be added
26 to the database. Placing a file named \fname{database.ignore} in a directory
27 will exclude the files in that directory and all its subdirectories from
28 scanning their tags and adding them to the database. This will speed up the
29 database initialization.
31 If a subdirectory of an `ignored' directory should still be scanned, place a
32 file named \fname{database.unignore} in it. The files in that directory and
33 its subdirectories will be scanned and added to the database.
35 \subsection{\label{ref:databasemenu}The Database Menu}
37 \begin{description}
38 \opt{tc_ramcache}{
39 \item[Load To RAM]
40 The database can either be kept on \disk{} (to save memory), or
41 loaded into RAM (for fast browsing). Setting this to \setting{Yes} loads
42 the database to RAM, allowing faster browsing and searching. Setting this
43 option to \setting{No} keeps the database on the \disk{}, meaning slower
44 browsing but it does not use extra RAM and saves some battery on boot up.
46 \opt{HAVE_DISK_STORAGE}{
47 \note{If you browse your music frequently using the database, you should
48 load to RAM, as this will reduce the overall battery consumption because
49 the disk will not need to spin on each search.}
53 \item[Auto Update]
54 If \setting{Auto update} is set to \setting{on}, each time the \dap{}
55 boots, the database will automatically be updated.
57 \item[Initialize Now]
58 You can force Rockbox to rescan your disk for tagged files by
59 using the \setting{Initialize Now} function in the \setting{Database
60 Menu}.
61 \warn{\setting{Initialize Now} removes all database files (removing
62 runtimedb data also) and rebuilds the database from scratch.}
64 \item[Update Now]
65 \setting{Update now} causes the database to detect new and deleted files
66 \opt{swcodec}{
67 \note{Unlike the \setting{Auto Update} function, \setting{Update Now}
68 will update the database regardless of whether the \setting{Directory Cache}
69 is enabled. Thus, an update using \setting{Update now} may take a long
70 time.
73 Unlike \setting{Initialize Now}, the \setting{Update Now} function
74 does not remove runtime database information.
76 \item[Gather Runtime Data]
77 When enabled, rockbox will record how often and how long a track is being played,
78 when it was last played and its rating. This information can be displayed in
79 the WPS and is used in the database browser to, for example, show the most played,
80 unplayed and most recently played tracks.
82 \item[Export Modifications]
83 This allows for the runtime data to be exported to the file \\
84 \fname{/.rockbox/database\_changelog.txt}, which backs up the runtime data in
85 ASCII format. This is needed when database structures change, because new
86 code cannot read old database code. But, all modifications
87 exported to ASCII format should be readable by all database versions.
89 \item[Import Modifications.]
90 Allows the \fname{/.rockbox/database\_changelog.txt} backup to be
91 conveniently loaded into the database. If \setting{Auto Update} is
92 enabled this is performed automatically when the database is initialized.
94 \end{description}
96 \subsection{Using the Database}
97 Once the database has been initialized, you can browse your music
98 by Artist, Album, Genre, Song Name, etc. To use the database, go to the
99 \setting{Main Menu} and select \setting{Database}.\\
101 \note{You may need to increase the value of the \setting{Max files in dir
102 browser} setting (\setting{Settings $\rightarrow$ General Settings
103 $\rightarrow$ System $\rightarrow$ Limits}) in order to view long lists of
104 tracks in the ID3 database browser.\\
106 There is no option to turn off database completely. If you do not want
107 to use it just do not do the initial build of the database and do not load it
108 to RAM.}%
110 \begin{table}
111 \begin{rbtabular}{.75\textwidth}{XXX}%
112 {\textbf{Tag} & \textbf{Type} & \textbf{Origin}}{}{}
113 filename & string & system \\
114 album & string & id tag \\
115 albumartist & string & id tag \\
116 artist & string & id tag \\
117 comment & string & id tag \\
118 composer & string & id tag \\
119 genre & string & id tag \\
120 grouping & string & id tag \\
121 title & string & id tag \\
122 bitrate & numeric & id tag \\
123 discnum & numeric & id tag \\
124 year & numeric & id tag \\
125 tracknum & numeric & id tag/filename \\
126 autoscore & numeric & runtime db \\
127 lastplayed & numeric & runtime db \\
128 playcount & numeric & runtime db \\
129 Pm (play time - min) & numeric & runtime db \\
130 Ps (play time - sec) & numeric & runtime db \\
131 rating & numeric & runtime db \\
132 commitid & numeric & system \\
133 entryage & numeric & system \\
134 length & numeric & system \\
135 Lm (track len - min) & numeric & system \\
136 Ls (track len - sec) & numeric & system \\
137 \end{rbtabular}
138 \end{table}