Mark Salling, who played Puck on 'Glee,' pleads guilty to child porn charges

Jennifer Kline, AOL.com

Mark Salling, who starred on "Glee" for the show's entire six-season run, pleaded guilty on Tuesday to child pornography charges.

Salling will face between four and seven years in prison, with 20 years of supervised release. His guilty plea comes nearly two years after investigators discovered more than 50,000 images and videos of child pornography on his laptop. The files were meticulously organized, and Salling definitively knew that the content featured real children, according to court filings.

Although Salling had attempted to mask his illicit activity with certain computer softwares, there were at least two incidents in 2015 in which Salling showed his child pornography collection to an adult woman with whom he was sexually involved.

The actor, who has not worked professionally since "Glee" wrapped in 2015, has agreed to pay $50,000 restitution to each victim and register as a sex offender. He will be prohibited to communicate with anyone under age 18 unless a parent or legal guardian of the minor is present. He also will not be able to live or loiter near schools, parks, public swimming pools, and other areas frequented by children.

In 2016, Salling was accused of raping a 22-year-old woman. The Los Angeles District Attorney declined to file a case based on insufficient evidence. In 2013, he settled a lawsuit with his ex-girlfriend for $2.7 million after she accused him of sexual battery.

Salling's ex-girlfriend and "Glee" co-star Naya Rivera wrote in her 2016 memoir that she was not "totally shocked" by the charges.