newdb: get_metadata() should have sorted formats list in mi.formats