Bradley Whitford as never seen before

The new cop-show spoof “The Good Guys” (7 p.m., Fox) parodies the buddy-cop genre and walks a fine line between affectionate homage and pure silliness, blending action, slapstick and glib dialogue.

Set in a Dallas police force where only one character speaks with a Texas accent, “Good” stars Colin Hanks as Jack Bailey, a tech-savvy detective whose nerdy ways have landed him the most dismal assignments. He’s assigned to baby-sit the precinct’s untouchable antique, Detective Dan Stark (Bradley Whitford).

Famous in the 1980s, Stark was once immortalized in a made-for-TV movie. He’s been coasting, and drinking, ever since.

Sporting a “Magnum P.I.” mustache and a bit of a paunch, it’s hard to believe this is the same Bradley Whitford who portrayed Josh Lyman, the Washington wonk in “The West Wing.” Whitford has a gas huffing and puffing his way through each chase scene and hopping inelegantly in and out of the vintage Trans Am he secures in the third act of this amusing pilot.

As silly as it can be, “The Good Guys” may be too clever for prime time. Often referencing the films and attitudes of Quentin Tarantino and the Coen brothers, it can sometimes seem like a riff on other nostalgic efforts. It unfolds like an homage to “The In-Laws,” the comedy classic from 1979, about a nerdy dentist (Alan Arkin) dragooned into espionage adventures by an unhinged spook (Peter Falk).

The action is frantic, if bloodless, the bad guys are cartoon characters, and Stark’s lady friends seem straight out of “Nash Bridges.” With all the hallmarks of a silly summer diversion, “Good Guys” is a fun ride if you’re willing to hop in the old-school Trans Am.

• “Ground War” (8 p.m., PBS, check local listings) examines the evolution of military strategy and hardware from ancient times to the present. The first hour, “Warrior Weapons,” surveys history from Alexander’s phalanx to the changes wrought by the development of the longbow and the introduction of gunpowder.

“Battlefield Mobility” (9 p.m.) examines the balance of speed and armor from Egyptian chariots to the tank battles of the 20th century. “Firepower” and “Command and Control” follow next Wednesday.

Tonight’s season finales

• Brick’s library fines add up on “The Middle” (7:30 p.m., ABC).

• Family photo day loses focus on “Modern Family” (8 p.m., ABC), the best new comedy of the year.

• Jules and Grayson have some harsh news for Bobby on “Cougar Town” (8:30 p.m., ABC).

• A domestic kidnapping case puts detectives in a dangerous bind on “Law & Order: Special Victims Unit” (9 p.m., NBC).

Tonight’s other highlights

• Celebrities impersonate the minimum-wage set in the candid-camera series “I Get That a Lot” (7 p.m., CBS).

• “Secrets of the Dead” (7 p.m., PBS, check local listings) recalls the pivotal and bloody battle of Stalingrad.

• The two finalists emerge on “American Idol” (8 p.m., Fox).

• Adam and Jamie put a water slide to the test on “Mythbusters” (8 p.m., Discovery).

• While recuperating, Mac has a “Rear Window” experience on “CSI: NY” (9 p.m., CBS).

• A hidden camera captures people in ethical dilemmas on “Primetime: What Would You Do” (9 p.m., ABC). “Happy Town” returns in June.