mpd-dbcreate: my customized mpd database creator #2384
Replies: 1 comment
-
|
So I've expanded this project and have started testing mpd-dbproxy. The proxy itself is not much different than what's built in to mpd. It is a stripped down binary that functions just as a database proxy; but it also depends on mpd-dbcreate to update the database. I wanted to integrate this directly in to mpd-dbcreate; but the lessons I learned getting that to work made me decided to stick to the unix philosophy of dedicated binaries. I also may not have realized satellite setup was a thing as I was too focused on database creation. I'm not the best dev so it's probably good I didn't try to combine two functions in to the thing. This will also allow you to do things like...run multiple proxies for different databases; so you could have a stereo database on one port, and one with stereo and multi on another port. I mean currently this is just...make a second config and run two processes. I may look in to making this a native feature. But mostly I just wanted to be able to update the database like a civilized user. :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
So a few months ago I found myself running Linux fulltime on the desktop and needing something to play the multitude of niche audio formats I have. MPD won because someone has a fork with plugins that support the one I really care about. But this brought in a new problem; about 40% of albums were somehow broken due to non-standard CUE files. I distinctly remember I had a 311 CD show up three times, each one with different working tracks and not a full set among the three. I wasn't going to place blame on anyone over this...I just have far too many albums to fix this with, there are some albums in which I need to parse the CUE files (in which they do work), and I don't want to just blindly delete every cue in the archive for the same reason. So after a few days of thinking and planning; it seemed best to just modify mpd to make a database the way I wanted...rather than try to parse one to clean it up. After a few months finding media files, testing, stripping out components, breaking things, and testing, I have mpd-dbcreate.
https://github.com/subtlecaffeine/mpd-dbcreate/
It's a stand-alone utility; carved out of mpd itself to ensure the best compatibility database wise. At some point I plan on doing full static builds so one can drop the binary directly on their NAS for external building of the database.
CUE files are now handled differently. mpd-dbcreate counts the number of media files in the directory and compares it to the number of tracks in the CUE. IF the track count matches, then we ignore the cue sheet and index the files directly. IF the tracks are split, I don't need the CUE. But if we have one FLAC file and 19 CUE tracks; then absolutely use that CUE file. We also ignore the CUE if it's count is 1 more than the number of media files. This accounts for multi-mode discs in which the data session will always show up as a track. If the number of tracks is off because files are just missing; well maybe that's some logic I'll check for in a future version. In that case it'll use a CUE file (if it exists) and those missing tracks just won't play.
However CUE sheets were not the only behavior I modified. The following were mostly specific to the niche formats; but might have some use for others.
Multichannel/Stereo Filtering: By specifying --stereo or --multichannel from the command line; the creator will filter out non matching content. This means I don't have all the odd 5.1 mixes on disc images clogging up my library.
Tag Fixes for Super Audio: The Super Audio plugin adds things to tags; format and channel count to the album title; as well as format, channel count, and track number to the title tags. This cleans those up so they appear normally in the database.
I cannot stress enough that this was really a personal project to fix issues. It was clearly a case of "this doesn't work the way I want so I'll just build something". I feel like after digging deep there was probably a fix for the CUE sheet thing..but I also feel like it may not have worked the way I wanted...plus my other issues required serious modification anyway.
I don't know if anyone else will find it useful; but here it is.
Beta Was this translation helpful? Give feedback.
All reactions