-
Notifications
You must be signed in to change notification settings - Fork 16
Collection Creation
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.
The Peppy Player Collection can be created by running Python script collector.py. The script can be executed on any machine/platform (Linux, Windows or Mac). The collection database file is the result of running the script. The name and extension of that file is arbitrary. For example it can be named peppy.db, jazz.db or just rock.
The easiest way to create the Collection database file is to use Raspberry Pi with one of the Peppy Player disk images as all required software was installed and configured. But this is not recommended way for Collection creation especially if the database file will be created on SD card. The process can degrade SD card because of multiple disk write operations especially if you have large collection (many audio files). It's highly recommended to use any other machine which doesn't have the flash storage (e.g. Windows or Mac desktop/laptop with HD or SSD disks).
In order to run the collector.py script the following software should be available on the machine where the script will be executed:
- Python - the Python interpreter is required to run any Python script. It can be downloaded from this web site
- collector.py - the script itself, it collects the metadata from audio files and saves it in the database file. The script can be found in the Peppy Player in folder /home/pi/Peppy/util/collector.py. It can be also downloaded from github
- Mutagen library - this Python library is required for fetching metadata (genre, album, artist etc) from audio files. It can be installed by running the following command on Linux:
pip3 install mutagen
on Windows:
python -m pip install mutagen
Here is the screenshot which shows the possible commands and parameters of the collector.py script:
The main script commands are:
- files - this command can be used before collection creation to estimate the time which the process will take.
- create - this is the main command which creates collection database
- db - this command shows database statistics
The following screenshot shows the example of running the collector.py script with files command on Windows machine for the folder with audio files collection c:\music.
The next image shows the example of running the collector.py script with create command. It takes one parameter for input folder (c:\music) and the other parameter is the name of the database file (c:\collection\peppy4.db).
The result of the Collection creation process is the database file (for example peppy4.db in the example above). The next wiki page will explain how to use that file.
- Peppy Players
- Peppy Home
- Hardware
- Audio Players
- Software
- Installation Guide
- Updating Guide
- Peppy Configuration
- Languages
- Scripts
- Voice Assistant
-
Peppy Player UI
- About
- Home Screen
- Radio Player
- Radio Groups
- Radio Favorites
- Radio Browser
- File Browser
- File Menu
- Quick Configuration
- File Player
- Audiobooks Player
- Audiobooks Browser
- Stream
- Podcasts Player
- Podcasts Browser
- AirPlay
- Spotify Connect
- Bluetooth Sink
- Jukebox
- Archive
- Equalizer
- Timer
- Language
- Network
- Headless Mode
- Resolution
- Recursive Playback
- Playback Order
- Information
- Background
- Icons
- Fonts
- Player Screen
- Image Viewer
- Switch
- Collection
- Catalog
- YA Streams
- Web UI
- Screensavers
- Woodware
- Sketches