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
}
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 \note{If you browse your music frequently using the database, you should
47 load to RAM, as this will reduce the overall battery consumption because
48 the disk will not need to spin on each search.
}
52 If
\setting{Auto update
} is set to
\setting{on
}, each time the
\dap{}
53 boots, the database will automatically be updated.
55 \note{The
\setting{Auto Update
} will only check for deleted files if the
56 \setting{Directory Cache
} (
\setting{Settings $
\rightarrow$ General
57 Settings $
\rightarrow$ System $
\rightarrow$ Disk $
\rightarrow$
58 Directory Cache
}) is enabled.
\setting{Update now
} includes that check
59 whether dircache has been enabled or not.
}
63 You can force Rockbox to rescan your disk for tagged files by
64 using the
\setting{Initialize Now
} function in the
\setting{Database
66 \warn{\setting{Initialize Now
} removes all database files (removing
67 runtimedb data also) and rebuilds the database from scratch.
}
70 \setting{Update now
} causes the database to detect new and deleted files
72 \note{Unlike the
\setting{Auto Update
} function,
\setting{Update Now
}
73 will update the database regardless of whether the
\setting{Directory Cache
}
74 is enabled. Thus, an update using
\setting{Update now
} may take a long
78 Unlike
\setting{Initialize Now
}, the
\setting{Update Now
} function
79 does not remove runtime database information.
81 \item[Gather Runtime Data
]
82 When enabled, rockbox will record how often and how long a track is being played,
83 when it was last played and its rating. This information can be displayed in
84 the WPS and is used in the database browser to, for example, show the most played,
85 unplayed and most recently played tracks.
87 \item[Export Modifications
]
88 This allows for the runtime data to be exported to the file \\
89 \fname{/.rockbox/database
\_changelog.txt
}, which backs up the runtime data in
90 ASCII format. This is needed when database structures change, because new
91 code cannot read old database code. But, all modifications
92 exported to ASCII format should be readable by all database versions.
94 \item[Import Modifications.
]
95 Allows the
\fname{/.rockbox/database
\_changelog.txt
} backup to be
96 conveniently loaded into the database. If
\setting{Auto Update
} is
97 enabled this is performed automatically when the database is initialized.
101 \subsection{Using the Database
}
102 Once the database has been initialized, you can browse your music
103 by Artist, Album, Genre, Song Name, etc. To use the database, go to the
104 \setting{Main Menu
} and select
\setting{Database
}.\\
106 \note{You may need to increase the value of the
\setting{Max files in dir
107 browser
} setting (
\setting{Settings $
\rightarrow$ General Settings
108 $
\rightarrow$ System $
\rightarrow$ Limits
}) in order to view long lists of
109 tracks in the ID3 database browser.\\
111 There is no option to turn off database completely. If you do not want
112 to use it just do not do the initial build of the database and do not load it
116 \begin{rbtabular
}{.75\textwidth}{XXX
}%
117 {\textbf{Tag
} &
\textbf{Type
} &
\textbf{Origin
}}{}{}
118 filename & string & system \\
119 album & string & id tag \\
120 albumartist & string & id tag \\
121 artist & string & id tag \\
122 comment & string & id tag \\
123 composer & string & id tag \\
124 genre & string & id tag \\
125 grouping & string & id tag \\
126 title & string & id tag \\
127 bitrate & numeric & id tag \\
128 discnum & numeric & id tag \\
129 year & numeric & id tag \\
130 tracknum & numeric & id tag/filename \\
131 autoscore & numeric & runtime db \\
132 lastplayed & numeric & runtime db \\
133 playcount & numeric & runtime db \\
134 Pm (play time - min) & numeric & runtime db \\
135 Ps (play time - sec) & numeric & runtime db \\
136 rating & numeric & runtime db \\
137 commitid & numeric & system \\
138 entryage & numeric & system \\
139 length & numeric & system \\
140 Lm (track len - min) & numeric & system \\
141 Ls (track len - sec) & numeric & system \\