I think I know the one you mean. It was a sort of parody of a Charles Dicken's type mystery, with Freddie Jones playing a lugubrious detectives.
Was it adapted from a novel by Leon Garfield ?
p.s. I think it was "The strange affair of Adelaide Harris"