Where might I find the video recommendation algo?

I’m just looking to find out how PeerTube chooses the recommended videos. Does anyone here know, or could you point me to which file the code is in?

Which recommended videos ? The ones on the « Discover » page ? The ones on the side or bottom when viewing a video ?