Skip to content

Collection

project-owner edited this page Feb 18, 2020 · 13 revisions

The Collection functionality in the Peppy Player allows to browse/search through the audio files collection in a logical way using such criteria as genre, artist, album, date etc. This functionality was based on the SQLite database which stores the audio files metadata fetched by means of Mutagen library. The collection database file can be created on any machine/platform (Linux, Windows or Mac) and copied from that machine to Raspberry Pi where Peppy player is running.

The SQLite database is a lightweight and efficient way to store the metadata info. It saves data in a single file. The SQLite database is available in all latest Python releases. There is no need to install it separately.

Browsing through the Collection outside of the player

If there is the need to browse through the collection outside of the Peppy Player the command line tool for doing that can be installed this way:

sudo apt-get install sqlite3

It's available on all major platforms (Linux, Mac and Windows). This tool is also installed on all Peppy Player disk images. The following example shows how to use the command line tool on Windows machine to list all tables used for the Collection functionality by using .tables command (peppy.db is the database filename):

collection-6

The output from this command shows that there are only two tables used to store the metadata information:

  1. metadata table stores the main metadata info such as album, artist, date etc.
  2. summary table stores the metadata summary like the total number of genres, artists etc.

The following image shows the example of summary table content for the collection created on Windows machine for c:\music folder.

collection-7

The next image shows the result of running SQL query for the album named 'The Album'. The query was executed against the metadata table:

collection-8

<<Previous | Next>>

Contents

Clone this wiki locally