chrrrisw / kmel_db

A parser and generator for Kenwood Music Editor Light databases
Apache License 2.0
6 stars 1 forks source link

kmel_db

A parser and generator for Kenwood Music Editor Light databases that works under Linux. The database is used by Kenwood car audio systems to allow searching by album, title, genre and artist. It also allows creation of playlists.

My Kenwood stereo only supports mp3 and wma media formats, so this is currently the default for this application.

Requirements

You'll need Python version 3 or above.

In order to parse the media files you'll also need the hsaudiotag3k python package installed to run. The stock library will work if you don't have any multi-disc albums, and DapGen will fall back to renumbering discs if you do. I have a fork of hsaudiotag which reads disc numbers, which I hope to merge into the PyPi version soon.

In order to get defaults for the path argument, you'll also need psutil.

Database format

The db_format.md document attempts to explain the format of the database. It might be slightly behind the code.

Generator

To generate a database, just type:

    ./DapGen.py /path/to/your/usb/drive

If you don't specify the path, the generator will process all mounted partitions of type FAT.

Use the '-h' option to see other options.

Current limitations:

Parser

To parse a database, just type:

    ./KenwoodDBReader.py -i /path/to/kenwood.dap/file

It will print copious logs, used by me to analyse the database. I may ask for this output if you want me to look into a problem.

Tests

To run the tests, just type:

    python3 -m kdbtest

If you have coverage installed, a test_coverage directory will be created with an HTML coverage report.