Yes, it was. The show drew inspiration from real events and characters related to the Times Square adult entertainment industry in the 1970s and 1980s.
The author of Sam Spade novels is Dashiell Hammett. Hammett was a master of the detective genre. His writing style for the Sam Spade stories was gritty and realistic, which influenced a whole generation of detective writers. Sam Spade, as a character, is known for his tough - as - nails attitude and sharp detective skills, which Hammett brought to life through his writing.