Redbox has settled its litigation with Disney, agreeing not to resell codes that allow customers to download movies.

Redbox has traditionally offered DVDs for rent through its distinctive kiosks. In October 2017, the company also began offering download codes at a considerable discount compared to the price on iTunes, Amazon or other services.

Redbox did not have a distribution deal with Disney. Instead, it bought up DVD combo packs, which included download codes. Though the labeling indicated that the codes were “not for sale or transfer,” Redbox separated the codes and sold them through its kiosks.

Disney sued, alleging that Redbox was encouraging its customers to violate copyright law. Redbox countered that it was not merely reselling something that it had purchased legitimately, much as a used bookstore would resell a book without running afoul of copyright law. Redbox also accused Disney of engaging in cutthroat tactics to thwart its efforts to buy DVD combo packs in hopes of stifling a low-cost competitor.

Redbox won an early round of the litigation, as Judge Dean Pregerson ruled that the warning on the combo pack labels did not create a binding contract. The judge denied Disney’s request for an injunction, but he rejected Redbox’s argument that the download codes should be considered a transferable object akin to a used book or DVD.

Disney then amended the warning to make it more explicit, and Pregerson granted Disney’s second request for a preliminary injunction in August 2018. The new language made it clear that the download code was a license assigned only to the purchaser of the combo packs. In August 2019, the judge denied Redbox’s motion to dismiss the case.

In the settlement filed on Thursday, Redbox agreed to be permanently enjoined from “selling, offering, distributing, marketing, or promoting” the codes. Each side agreed to bear its own costs of litigation.