def get_tracklist(response, tracktype='recenttracks'):
    """Read JSON page and get a list of tracks and their info.

    :param response: Response from a request to the server (JSON page of the server)
    :param tracktype: Type of information to download from the server, can be either 'recentracks' or 'lovedtracks'
    :return: list of tracks in the page
    """
    tracklist = response[tracktype]['track']
    return tracklist
