public static void loadTracks(Album a) throws IOException, JSONException, RdioException {
RdioAlbum rdioAlbum = (RdioAlbum) a;
List<DataSet> datasets = a.getTracks();
RdioClient rdio = new RdioCoreClient(new RdioClient.Consumer(Rdio.KEY, Rdio.SHARED_SECRET));
//@formatter:off
String extras = "["
+ "{\"field\": \"*\", \"exclude\": true},"
+ "{\"field\": \"name\"},"
+ "{\"field\": \"icon\"},"
+ "{\"field\": \"tracks\", \"extras\": ["
+ " {\"field\": \"*\", \"exclude\": true},"
+ " {\"field\": \"name\"},"
+ " {\"field\":\"key\"},"
+ " {\"field\":\"artist\"},"
+ " {\"field\":\"trackNum\"}]"
+ "}]";
//@formatter:on
logger.debug("Getting album {} [{}] from Rdio", rdioAlbum.getTitle(), rdioAlbum.getId());
String response = rdio.call("get", Parameters.build("keys", rdioAlbum.getId()).and("extras", extras));
logger.trace("Response from Rdio: {}", response);
JSONObject json = new JSONObject(response);
if ("ok".equalsIgnoreCase(json.getString("status"))) {
JSONObject result = json.getJSONObject("result");