U.S. Bankruptcy Court Judge Michael Wiles today approved Relativity’s agreement to sell its TV operations to a group of creditors, leaving film and other assets under CEO Ryan Kavanaugh’s control — at least for now. “There’s been an awful lot of work and days without sleep,” Wiles said. “Everybody appreciates it.”

In the deal he endorsed, TV — Relativity’s crown jewel — will go to creditor group known in the case as Stalking Horse Bidders which includes Cortland Capital, Anchorage Capital, Falcon Investment Advisors, and Luxor Capital. They agreed to forgive $125 million worth of debt in exchange for the properties.

The operation includes 435 shows such as CBS’ new Limitless (Relativity would “retain the right to receive 10% of producer fees”), Haywire (Relativity receives 50% of producer fees) and Act Of Valor (Relativity receives 10% of producer fees). Others on the list include CNN Heroes, Catfish, Cooking With Salt-N-Pepa, and My Teen Is Pregnant.

In addition, the negotiations conducted through the weekend enable Manchester Securities — the second biggest creditor after Cortland — to pay $35 million for Relativity’s $49.5 million debtor-in-possession financing agreement. It has “superpriority senior secured” status, meaning it would be first in line to be paid if the company runs into more trouble after emerging from Chapter 11 bankruptcy protection.

IATM objected to Relativity’s plan to sell the TV rights to Act Of Valor. The studio agreed to address the matter before October 14, when the court plans to hold a hearing to review contested matters before the deal closes. If all goes as planned, that will take place on October 20.

Yet to be determined is the fate of Relativity’s other assets including film. Kavanaugh and his partners including VII Peaks Capital, Joseph Nicholas, and OA3 say that they plan to raise $60 million to pay Relativity’s debt to Cortland. The studio adds that by January it will present a plan to the Bankruptcy Court to finance the ongoing operations.