[api] handle captical changes in media names

We crashed before when a media string stays the same, except for uppercase/downcase changes.