Internal Dev Repo. A lightweight stand-alone database proxy server for mpd. Uses mpd-dbcreate for database updates.
| doc | ||
| src | ||
| subprojects | ||
| systemd | ||
| AUTHORS | ||
| config.h | ||
| COPYING | ||
| LICENSE | ||
| meson.build | ||
| meson_options.txt | ||
| mpd-dbproxy.conf.example | ||
| mpd.svg | ||
| NEWS | ||
| README.md | ||
mpd-dbproxy
A lightweight MPD protocol server for serving database queries from an existing MPD database file.
Building
mpd-dbproxy is built as part of the MPD build system using Meson.
Prerequisites
- Meson 1.2+
- Ninja
- GCC 12+ or Clang 14+
- Required dependencies (same as MPD core)
Build Commands
# Configure the build (from MPD root directory)
meson setup . output/dbproxy --buildtype=debugoptimized
# Build mpd-dbproxy
ninja -C output/dbproxy src/dbproxy/mpd-dbproxy
# The binary will be at:
# output/dbproxy/src/dbproxy/mpd-dbproxy
Build Options
# Debug build with verbose output
meson setup . output/debug --buildtype=debug
# Release build
meson setup . output/release --buildtype=release -Db_ndebug=true
# Reconfigure existing build
meson configure output/dbproxy --buildtype=release
Usage
# Using a config file
mpd-dbproxy --config /etc/mpd-dbproxy.conf
# Using command-line options
mpd-dbproxy --music-dir /mnt/music --database /var/lib/mpd/mpd.db --port 6600
# With verbose logging
mpd-dbproxy --config /etc/mpd-dbproxy.conf --verbose
Command-Line Options
| Option | Short | Description |
|---|---|---|
--config <file> |
-c |
Path to configuration file |
--music-dir <path> |
-m |
Music directory (overrides config) |
--database <file> |
-d |
Database file (overrides config) |
--port <port> |
-p |
TCP port (overrides config) |
--verbose |
-v |
Enable verbose logging |
--help |
-h |
Show help message |
Configuration
See mpd-dbproxy.conf.example for a complete example configuration file.
Architecture
mpd-dbproxy serves an existing MPD SimpleDatabase file and responds to MPD protocol queries. When it receives update or rescan commands, it spawns mpd-dbcreate to update the database file, then reloads the database and notifies connected clients.
Supported Commands
- Database: find, search, findadd, searchadd, list, count, listall, listallinfo, lsinfo, listfiles
- Stats: stats
- Protocol: ping, close, kill, password, idle, noidle, tagtypes, commands, notcommands, urlhandlers
- Update: update, rescan (spawns mpd-dbcreate)
Use with MPD Proxy Database Plugin
Configure your main MPD instance to use the proxy database plugin:
database {
plugin "proxy"
host "localhost"
port 6600
password "your_password"
keepalive yes
}
This allows MPD to delegate all database operations to mpd-dbproxy.