Hi @littledevil
First, you can use this code to show the content of your repeater:
<pre>
<?php
print_r(get_field('books'));
?>
</pre>
Then, you can loop the returned data and check if the id or the link match or not. This comment has a good example to help you start with it: http://php.net/manual/en/function.array-search.php#91365.
Hope this helps.