'Takes torrentgroup section from parsed JSON response from \'artist\' action on api, and updates relevant information.'

def set_artist_group_data(self, artist_group_json_response):

    if (self.id != artist_group_json_response['groupId']):
        raise InvalidTorrentGroupException(("Tried    to    update    a    TorrentGroup's    information    from    an    'artist'    API    call    with    a    different    id." + ('    Should    be    %s,    got    %s' % (self.id, artist_group_json_response['groupId']))))
    self.name = artist_group_json_response['groupName']
    self.year = artist_group_json_response['groupYear']
    self.record_label = artist_group_json_response['groupRecordLabel']
    self.catalogue_number = artist_group_json_response['groupCatalogueNumber']
    self.tags = []
    for tag_name in artist_group_json_response['tags']:
        tag = self.parent_api.get_tag(tag_name)
        self.tags.append(tag)
    self.release_type = artist_group_json_response['releaseType']
    self.has_bookmarked = artist_group_json_response['hasBookmarked']
    self.torrents = []
    for torrent_dict in artist_group_json_response['torrent']:
        torrent = self.parent_api.get_torrent(torrent_dict['id'])
        torrent.set_torrent_artist_data(torrent_dict)
        self.torrents.append(torrent)
    self.has_complete_torrent_list = True
