Update viewing_history.pl