Shut Up Baby, I Know It!

main
Jay Moore 2 days ago
parent 6eeea76e08
commit c5f56d8061

@ -135,6 +135,17 @@ Paths in the database are all stored relative to `--music-dir`. This means if yo
It's been two months since I built the first database with an early version and I've done numerous updates since; both for new media and to test new builds. That database has never been an issue and has made mpd a joy to use since it works the way *I* want it.
As a rough benchmark: It scanned an 8000 file library of 450.3 gigs in about 6.5 minutes; this includes the delay for the numerous ISOs in the library.
## Notes
Please make note of the following things:
- If you get a "simple database" error; check the path of the database you specified.
- Try to use full paths at all times.
- It looks like it hangs on ISO files when using --verbose. It's not. Just wait. I believe it's something with the plugin that I don't want to touch.
- Your music directory is root of the database. Keep this in mind if you want to scan on a different system.
## Changes
```
28-AUG-2025 - Initial hacking of database tool from mpd-sacd itself. Multichannel, CUE, SACD logic updates.
@ -142,7 +153,7 @@ It's been two months since I built the first database with an early version and
01-SEP-2025 - After being able to actually test DVD-Audio; modified DVD-Audio plugin to match SACD behavior for track and channel filtering.
24-SEP-2025 - Added --update-path option to update just a specific path in the database and waiting 3 weeks to getting around to testing it.
24-OCT-2025 - Removed dependencies and code not needed, like output plugins, mixers, libmpdclient, chromaprint. Internal Development Release.
31-OCT-2025 - Missed encoders and filters. Wrote documentation. Tweaked things for release builds. Milestone release: Version 1.0 equivalent.
01-NOV-2025 - Missed encoders and filters. Wrote documentation (manpage). Tweaked things for release builds. Milestone release: Version 1.0 equivalent.
```
## Bugs & Issues

@ -94,6 +94,16 @@ The MPD database can live just about anywhere on the system. The usual location
The database can be moved to a different system than it was scanned on. This is helpful for scanning directly on the NAS. The database stores everything as relative to the root of the music directory. So you can scan ``/raid/music`` on your NAS, mount it as ``/mnt/music`` on your local machine, point MPD to ``/mnt/music``, and that's it.
NOTES
-----
Please make note of the following things:
- If you get a "simple database" error; check the path of the database you specified.
- Try to use full paths at all times.
- It looks like it hangs on ISO files when using --verbose. It's not. Just wait. I believe it's something with the plugin that I don't want to touch.
- Your music directory is root of the database. Keep this in mind if you want to scan on a different system.
SEE ALSO
--------

@ -1,7 +1,7 @@
project(
'mpd-dbcreate',
['c', 'cpp'],
version: '1.0',
version: 'Shut Up Baby, I Know It!',
meson_version: '>= 1.2',
default_options: [
'c_std=c11',
@ -115,6 +115,9 @@ if compiler.get_id() == 'gcc' and compiler.version().version_compare('<12')
elif compiler.get_id() == 'clang' and compiler.version().version_compare('<14')
warning('Your clang version is too old. You need at least version 14.')
endif
if get_option('b_lto')
add_project_link_arguments('-Wno-odr', language: 'cpp')
endif
version_conf = configuration_data()
version_conf.set_quoted('PACKAGE', meson.project_name())

@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#pragma once
// Channel mode for database creation filtering
enum class ChannelMode {
STEREO,
MULTICHANNEL,
ALL
};
// External function to get channel mode
// Implemented in Main.cxx for mpd-dbcreate
// Note: Using extern "C" to avoid C++ name mangling so it can be called from any namespace
extern "C" ChannelMode GetChannelMode() noexcept;

@ -36,12 +36,7 @@
#include "event/CoarseTimerEvent.hxx"
#include "util/BindMethod.hxx"
// Channel mode shared with FilteredSongUpdate
enum class ChannelMode {
STEREO,
MULTICHANNEL,
ALL
};
#include "ChannelMode.hxx"
// Helper class to check update completion with a timer
class UpdateChecker {
@ -85,11 +80,11 @@ static bool verbose = false;
static bool update_mode = false;
static std::string update_path;
// Global instance pointer required by other MPD components
// Global instance pointer required by other MPD components
// This must be defined here as we're not linking with Main.cxx
Instance *global_instance = nullptr;
extern "C" __attribute__((visibility("default"))) ChannelMode GetChannelMode() noexcept {
extern "C" ChannelMode GetChannelMode() noexcept {
return channel_mode;
}

@ -7,18 +7,7 @@
#include "db/plugins/simple/Song.hxx"
#include "pcm/AudioFormat.hxx"
// External function to get the channel mode
enum class ChannelMode {
STEREO,
MULTICHANNEL,
ALL
};
// Weak symbol allows override in DbMain
extern "C" __attribute__((weak)) ChannelMode GetChannelMode() noexcept {
// Default to ALL mode (no filtering) for normal MPD
return ChannelMode::ALL;
}
#include "ChannelMode.hxx"
static bool

@ -197,15 +197,7 @@ finish() noexcept {
my_av_log_set_default_callback();
}
// External function to get channel mode for database creation
enum class ChannelMode {
STEREO,
MULTICHANNEL,
ALL
};
extern "C" __attribute__((weak)) ChannelMode GetChannelMode() noexcept {
return ChannelMode::ALL; // Default for normal MPD
}
#include "ChannelMode.hxx"
static std::forward_list<DetachedSong>
container_scan(Path path_fs) {

@ -220,15 +220,7 @@ finish() noexcept {
container_update(nullptr);
}
// External function to get channel mode for database creation
enum class ChannelMode {
STEREO,
MULTICHANNEL,
ALL
};
extern "C" __attribute__((weak)) ChannelMode GetChannelMode() noexcept {
return ChannelMode::ALL; // Default for normal MPD
}
#include "ChannelMode.hxx"
static std::forward_list<DetachedSong>
container_scan(Path path_fs) {

@ -64,6 +64,8 @@ static int DVDReadLBUDF( dvd_reader_t *device, uint32_t lb_number,
#define NULL ((void *)0)
#endif
namespace {
struct Partition {
int valid;
char VolumeDesc[128];
@ -75,6 +77,8 @@ struct Partition {
uint32_t Length;
};
} // anonymous namespace
struct AD {
uint32_t Location;
uint32_t Length;

Loading…
Cancel
Save