def set_piece_priorities(torrent_client, params):
    """
    Set priorities for all pieces in a torrent

    params['info_hash']: str - torrent info-hash
    params['priority']: int - priority from 0 to 7.
    :return: 'OK'
    """
    torrent_client.set_piece_priorities(params['info_hash'], params['priority'])
    return 'OK'