public int Update()
{
MpdResponse response = this.getConnection().Exec("update");
if (response.Message.Count != 1)
throw new InvalidMpdResponseException("Respose message has more than one line.");
int ret;
KeyValuePair<string, string> line = response[0];
if (!line.Key.Equals("updating_db"))
throw new InvalidMpdResponseException("Key of line 0 is not 'updating_db'");
if (!int.TryParse(line.Value, out ret))
throw new InvalidMpdResponseException("Value of line 0 is not a number");
return ret;
}