The title of the thread doesn't specify sci-fi, and I missed that disqualifier in your first message. However, Star Trek is amongst one of the top TV/film programs in terms of total hours re a franchise, period, so I don;t think it needs to be sectioned off into a sci-fi category. I think it's indisputably got the greatest total running time of all science fiction shows.
I edited my comments above to reflect this.
Yeah, it's not your fault, I ran out of space in the title of the thread, and did not explicitly state 'scifi' until the end of my post, but I did edit the post so that I mention it from the start