Moving newEpisodeCheck to C++