Update of the media library now only occurs once.

Previously the update function was called at the end of every action
performed. This sometimes could abort a update in progress.