Technology
 

Hack:update and add

From Music Player Daemon Community Wiki

This simple shell script updates the database and adds all songs, when finished.

#!/bin/sh
echo 'updating...'
mpc update > /dev/null
while [ -n "$(mpc | grep Updating)" ] ; do sleep 5 ; done
echo 'adding...'
mpc clear
mpc add / > /dev/null
mpc play