Skip to content

Collection Configuration

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

The creation process of the Collection database file was described in the previous wiki page. The file created by the collector.py script contains the metadata information for all audio files in the folder which was defined as input during script execution.

The folder name for each audio file was stored in the collection database together with metadata information. The stored folder name doesn't include the top level folder.

Let's consider the example when the Collection was created on Windows machine. The hard drive with audio files was connected to the Windows machine. The name of the folder with audio files on the hard drive was h:\music. Here is the example of the collector script which was used to create collection database:

python collector.py create -i h:\music -o c:\temp\peppy.db

The folder h:\music\pop\a\ABBA[1977]ABBA - The Album will be stored in the database without base folder defined during script execution (h:\music):

/pop/a/ABBA/[1977]ABBA - The Album

Then the same hard drive was mounted on Raspberry Pi to the folder /home/pi/music. In this case combining the mount point and the folder name from the collection database it's possible to construct the correct path to the folder:

/home/pi/music/pop/a/ABBA/[1977]ABBA - The Album

Here are all properties required to configure the Collection functionality in the Peppy player. The properties can be defined in the config.txt file directly or using the Config Web UI.

[collection]
database.file = /home/pi/collection/peppy.db
base.folder = /home/pi/music
show.numbers = True

collection-9

The property database.file defines the path to the collection database file. The property base.folder defines the folder to which the disk with audio files was mounted. And the property show.numbers defines if the number of collection items should be displayed in UI.

Here is the Collection UI screenshot with show.numbers set to False

collection-10

The following image shows the same UI when show.numbers was set to True

collection-11

Each Collection item can be included/excluded from UI using collection.menu section in the config.txt file.

[collection.menu]
genre = True
artist = True
composer = True
album = True
title = True
date = True
folder = True
filename = True
type = True

collection-16

<<Previous | Next>>

Clone this wiki locally