MPD Hack of the week
Well now that mpd 0.13.0 is released. Time to announce my mpd hack of the week.
It doesn’t actually hack mpd, or need recompile, you can run it separately.
What does it do:
Watch mpd’s music directory using inotify.
When an update is made (create/delete/modify) track this.
25 seconds after the last update, tell mpd to update the directoryÂ that have all updates in commen. (so if update in /Sorted/L-Z/L/ and updates in /Sorted/L-Z/Z/ it will update /Sorted/L-Z/).
if mpd was allready updating, try again in 25 seconds.
As I said it’s a hack, so it most likely make your dog cranky and your coffee sour.
It requires: libmpd,Â libglib-2.0 (for the main loop) and inotify support.
extract, and run make. (there is a i386 binary inside.)
run it ./inot
and it _should_ work.
p.s. possible new gmpc icon, let me know what you think: