Fix bad switching between API and Rummager formats

Instead detect the format from the response.