Hot Diggity README

main
Jay Moore 6 days ago
parent 043d5b166d
commit 059c004392

@ -1,4 +1,4 @@
# mpd-dbcreate - "Well we're boned!" Alpha
# mpd-dbcreate | Jay's MPD Database Creator - "Hot Diggity Daffodil!"
It's mpd without the daemon and playback functionality. Creates an mpd database based on "better" rules regarding CUE sheets, multi-channel files, and SACD content.
@ -7,26 +7,21 @@ It's mpd without the daemon and playback functionality. Creates an mpd database
mpd-dbcreate is a command-line tool that creates MPD-compatible database files without running the full MPD daemon. This is particularly useful for:
- Creating databases for large music collections without running MPD *You got hit by the systemd timeout first launch, didn't you?*
- Building databases on systems where MPD isn't installed *Run it directly on the RAID!*
- Scanning network-mounted collections (NFS, SMB, etc.) *Without mounting...if that's your thing!*
- Filtering collections by channel configuration (stereo/multichannel) *Both SACD and other media!*
- Currently doesn't support directly updating the database. *and you sure as hell can't use mpd to update anymore.*
- The same size as the mpd binary! *I mean...this is just mpd with the server portion disabled and just writing a database.*
mpd-dbcreate is currently considered alpha software. May not be suitable for production work. Use at your own risk. I'm not responsible for what happens. Safety not guaranteed.
- Creating databases for large music collections without running MPD - *You got hit by the systemd timeout first launch, didn't you?*
- Building databases on systems where MPD isn't installed - *Run it directly on the RAID...just symlink or awk your paths*
- Filtering collections by channel configuration (stereo/multichannel) - *Even that niche format.*
- Supports updating an existing database. - *But only with this utility and not from within mpd.*
- Slightly smaller than the mpd binary! - *We at Monolithic Binary love you; as much as you love us.*
## Features
- Scans music directories and creates MPD-compatible database files *At least the way I want them made.*
- Supports all audio formats that MPD supports *SACD playback support depends on your version/build of mpd. Milage may vary.*
- Handles large collections (tested with multi-TB libraries) *and I did it over the network!*
- Scans music directories and creates MPD-compatible database files - *At least the way I want them made.*
- Supports all audio formats that MPD supports - *SACD playback support requires Max's fork of mpd. Milage may vary. Hi Max!*
- Handles large collections (tested with multi-TB libraries) - *and I did it over the network in about an hour! Like reasonable frames with your perscription!*
- Looks for every reason to not use a .CUE sheet. *There are valid reasons and that's why I wrote this!*
- ~~Network filesystem support (NFS, SMB, WebDAV)~~ *Support is built in but untested and broken as of now*
- ~~Network filesystem support (NFS, WebDAV)~~ *URI's are supported, but broken? Please report. SMB is disabled.*
- Channel filtering options (stereo-only, multichannel-only, or all) *Because it's not like I listen to the Britney Spears in 5.1 on a regular basis.*
- ~~Progress indication for long scans.~~ (Soon) *I just look at system monitor for disk/network access.*
## "Better" Media Handling
@ -35,11 +30,9 @@ I created this for the basic reason that mpd was not generating databases that w
### CUE Sheet Handling
You don't always need a CUE sheet for playback. If your media files are alraedy split up, as the usually already are, then a CUE sheet doesn't give you any advantage on plaback. In fact, this is a disadvantage. If mpd sees a cue sheet; it will only index that cue sheet. This is fine except when it doesn't properly parse the sheet and you wind up with most of an album unplayable.
You don't always need a CUE sheet for playback. If your media files are alraedy split up, as the usually already are, then a CUE sheet doesn't give you any advantage on playback. In fact, this is a disadvantage. If mpd sees a cue sheet; it will only index that cue sheet. This is fine except when it doesn't properly parse the sheet and you wind up with most of an album unplayable.
The solution is to just not use CUE sheets unless necessary. It compares the number of tracks in the CUE sheet to the number of media files in the folder. As long as the number of tracks in the CUE doesn't exceed one more than the file count; it will completely ignore the CUE and just index the media files directly! No more broken albums and albums that do require a CUE sheet still get them.
Why one more than file count? Multi-session/EnhancedCD/CDExtra discs. That data session counts as a track in the CUE sheet. We will never match tracks vs files from a multi-session disc; so that allowance of 1 catches those.
The solution is to just not use CUE sheets unless necessary. It compares the number of tracks in the CUE sheet to the number of media files in the folder. As long as the number of tracks in the CUE doesn't exceed one more than the file count; it will completely ignore the CUE and just index the media files directly! No more broken albums and albums that do require a CUE sheet still get them. Why one more than file count? Multi-session/EnhancedCD/CDExtra discs. That data session counts as a track in the CUE sheet. We will never match tracks vs files from a multi-session disc; so that allowance of 1 catches those.
### Multi-Channel Filtering
@ -53,7 +46,7 @@ SACD's are presented to mpd in a non-standard way; so we had to go down in to th
We also cleaned up the tags! The plugin added technical information to the album and track title tags. It's ugly. Primarily putting the channel configuration and track number in the track title is a bit much. So...we clean everything up! Track titles are sanitized/cleaned to be just the title, same with the album titles. Afterall...if you're only running stereo content, then it's all stereo; you're not at a risk of picking the multichannel version. Likewise, if you've got a multi-channel database; you won't be getting any stereo content.
And if you kept everything, you're still covered! We append (Stereo) or (Multichannel) to the album title. Clean, more human-readable.
And if you kept everything, you're still covered! We append (Stereo) or (Multichannel) to the album title. Clean, more human-readable. But we only do this on SACD. You'll have to tag your non-SACD multichannel releases yourself. (For now. It's literally not that difficult to have it mark non-SACD multi-channel; I just haven't done that yet.)
## Building
@ -79,7 +72,7 @@ meson setup builddir
ninja -C builddir
```
The executable will be created at `builddir/mpd-dbcreate`.
The executable will be created at `builddir/mpd-dbcreate`. You can customize for just formats you need by editing meson_options.txt
## Installation
@ -88,14 +81,16 @@ There is no installation. mpd-dbcreate is a static binary. You may put it in you
## Usage
```bash
mpd-dbcreate --music-dir <path> --database <path> [options]
mpd-dbcreator --music-dir <path> --database <path> [options]
Options:
--update Updates an existing database.
--music-dir <path> Music directory to scan (required)
--database <path> Output database file path (required)
--stereo Include only stereo files
--multichannel Include only multichannel files
--all Include all files (default)
--verbose Output messages to console
--help Show help message
```
@ -116,9 +111,17 @@ Create a database of all content:
mpd-dbcreate --music-dir /path/to/media --database /path/to/file.db -all
```
## Compatibility
Update an existing database:
```bash
mpd-dbcreate --music-dir /path/to/media --database /path/to/file.db (--stereo|--multichannel|--all) --update
```
The generated database files are fully compatible with MPD and can be used as drop-in replacements for MPD's own database files. Simply copy the generated database to your MPD state directory (typically `/var/lib/mpd/database` or `~/.mpd/database`).
## Changes
```
28-AUG-2025 - Initial hacking of database tool from mpd-sacd itself. Multichannel, CUE, SACD logic updates.
29-AUG-2025 - Removed systemd, output, and daemonization features where possible. Restored verbose output from systemd hijack. Got --update working.
```
## License
@ -126,5 +129,5 @@ GPL-2.0-or-later (inherited from MPD). Please see the `COPYING` or `LICENSE` fil
## Credits
Based on Max's fork of mpd with SACD and DVD-A plguins: https://sourceforge.net/projects/mpd.sacddecoder.p/
Based on Max's fork of mpd with SACD and DVD-A plguins: https://sourceforge.net/projects/mpd.sacddecoder.p/ - Thanks Max!
Original MPD project: https://www.musicpd.org/

Loading…
Cancel
Save