Throughout the fall, the producer Greg Berlanti was trying to save his cable drama “You.”

The series had premiered on Lifetime in September, but its viewership was virtually nonexistent: roughly 650,000 people were tuning in to each episode of the soapy stalker thriller, starring Penn Badgley. Even Mr. Berlanti, one of the most successful and prolific producers in television thanks to shows like “Riverdale,” “Arrow” and “Blindspot,” conceded in an interview that “barely anybody watched” it.

He made repeated calls to Lifetime executives, asking for patience and making his case for a second season. It wasn’t enough. In early December, Lifetime announced it was finished with “You.”

But right after Christmas, something happened. “You” started lighting up social media. People were searching for it online. Entertainment sites like The Ringer were writing about the show.

What changed? It began streaming on Netflix.

Mr. Berlanti heard from family and friends about how much they were enjoying his new show, ignoring the fact that it had debuted months earlier.