Redbox has agreed to stop reselling Disney movies’ digital download codes, according to The Hollywood Reporter. The agreement settles a lawsuit Disney filed over the practice in December 2017.

Redbox maintains agreements with film distribution companies like Warner Bros., which provide Redbox with discs that Redbox then rents out to customers. However, Disney doesn’t have an agreement with Redbox, so Redbox was forced to purchase Disney movies elsewhere in order to offer the films for rent.

Disney often bundles DVDs and Blu-rays with digital download codes. Redbox would sell those download codes at cheaper prices than other download retailers like iTunes. Disney filed a lawsuit against this practice, saying that it violated the company’s contracts and copyright.

Disney lost an initial attempt to block Redbox, with the judge ruling that Disney’s label that “Codes are not for sale or transfer” was not a contract and that the licensing agreements governing the bundles interfered with consumers’ ownership rights. Disney stipulated that you must own a physical copy in order to redeem the download, but according to copyright law, you have the right to sell a physical copy after purchase.

Redbox filed a lawsuit against Disney, claiming that Disney was engaging in anti-competitive practices to bolster Disney+, along with a motion to dismiss Disney’s lawsuit over the download codes.

Disney later changed the definition of its bundles so that the use of the code no longer depended on also owning the disc, but instead relied on how you got the code. Disney ultimately won all claims barring falsely advertising the combo packs, including a permanent injunction against Redbox selling download codes.