Update visit_playlist() to use indices