Tribune Media continues its effort to raise cash with a deal unveiled this morning to sell its Gracenote data unit to Nielsen for $560 million. Tribune will hang on to two business-to-consumer websites: Covers.com and ProSportsDaily.com.

The companies expect the deal to close by the end of March. Tribune says it should net $500 million after taxes, which it will use to pay down its existing debt with the remainder to be reinvested in the business.

But it adds that it will use existing cash to pay a special dividend of $500 million to shareholders and warrantholders in Q1. What’s more, it plans to continue repurchasing shares with $168 million remaining in the $400 million authorization earlier this year.

Tribune CEO Peter Liguori says he’s “pleased to be streamlining our company so that we can focus even more intently on seizing future opportunities for our local television and entertainment business.”

The dividend and share repurchases reflect “our long-standing commitment to returning capital to shareholders while maintaining a balanced approach to our overall capital structure.”

Tribune has been struggling to round up cash — and potentially a buyer. In February it hired two financial advisers, Moelis & Co and Guggenheim Securities, to “explore the full range of strategic and financial alternatives to enhance shareholder value.”

The company had about $3.5 billion of outstanding debt at the end of September, or $2.8 billion net of cash.

Tribune has sold nine real estate properties in 2016 for $519 million, netting $409 million after expenses.

But the company also grappled with a dispute with Dish Network, which resulted in Tribune stations going dark on the No. 2 satellite service for much of the summer. And political ad sales were lower than expected this year.

Nielsen could benefit from the deal: Gracenote’s database includes descriptions of “virtually every song, TV show and movie ever produced, along with sports scores and statistics for all of the world’s top leagues and teams,” the companies say.

Comcast, DirecTV and others use the TV information for their program guides. The music data helps to power recommendation engines for Apple and Spotify. Gracenote’s data also feeds infotainment systems for 85 million cars from Tesla, Ford, BMW, Toyota and others, the companies say.

Gracenote CEO John Batter calls Nielsen “a natural home” for his company. Both “have entertainment data at their core and have spent years delivering services to the world’s top media brands. Bringing together our data for driving discovery and tune-in with Nielsen’s deep insights about what people are watching, listening to and buying makes a formidable combination.”

Tribune paid Sony $170 million for Gracenote in 2014. Since then it has added to the business, including a $50 million deal that year for Baseline’s info about film and television productions.