Choosing the tunes for HBO’s “Winning Time: The Rise of the Lakers Dynasty” became a treasure hunt for hidden gems for music supervisor Gabe Hilfer.

Set in the ’80s, the series loosely tells the story of the Los Angeles Lakers, owner Jerry Buss and Magic Johnson. Hilfer came on board and immediately pulled “cool, stylized music from the period and before, so we could paint a picture of that time in L.A.”

Orchestral disco from Spirit of Brotherhood, Arizona hard rockers Loosely Tight and Miami Cuban salsa band Ray & His Court are just some of the lesser-known acts Hilfer chose to reflect the era. The music supervisor says his goal was to introduce viewers to artists like Afro-rockers the Hygrades, whose song “Somebody’s Gonna Lose or Win” plays at the end of Episode 2 when coach Jerry West resigns, and have them say, “Now I’m going to put them on my playlist.”

Aside from hoping to shine a spotlight on “artists who might not be making money anymore,” Hilfer also made it his mission to seek out lesser-known hits from well-known artists.

In the pilot, Jerry (John C. Reilly) and Magic (Quincy Isaiah) head to a party in Malibu. Finding that the first song chosen for that scene, a piano performance, wasn’t working, executive producer Adam McKay requested something with more energy. Hilfer did a deep dive into the music of the era and stumbled across Neil Diamond’s “The Dancing Bumble Bee / Bumble Boogie.” He says, “I ended up falling in love with it because it feels good and it felt of the moment — what would authentically be on at that party.

“You can recognize it’s [Diamond’s] voice, but I’ve never heard that song,” adds Hilfer, who happily notes that the show is “exposing people to parts of a catalog of some big, famous artist that they might not even know.”