A judge grants the website's motion to dismiss the suit over the leaked "Hateful Eight" script because the director "failed to adequately plead facts establishing direct infringement" by people who clicked on the link.

Quentin Tarantino has suffered a setback in his effort to punish Gawker for linking to a copy of his unproduced screenplay The Hateful Eight.

A federal judge in California has granted the gossip website's motion to dismiss the director's copyright infringement lawsuit. But the court is allowing Tarantino to refile the case if he makes key changes.

PHOTOS: 35 of 2014's Most Anticipated Movies

Read the full decision here.

As you'll recall, Tarantino sued Gawker for contributory copyright infringement earlier this year after the site linked to another site that had published the leaked Hateful Eight screenplay draft in full. Gawker encouraged its readers to "enjoy" reading the script, leading Tarantino to claim that the site was "contributing" to the infringement of the copyrighted script and hurting its market value. Gawker, on the other hand, argued that it linked to the script only in the course of reporting on the news that Tarantino had become upset over the script being leaked and vowed to scrap the film, thus making its acts a "fair use" and not punishable.

Gawker then filed a motion to dismiss, and in a ruling on Tuesday, the court declined to address the "fair use" issue but granted the motion because Tarantino "failed to adequately plead facts establishing direct infringement by a third party or facts that would demonstrate [Gawker] either caused, induced, or materially contributed to the alleged direct infringement of those third party infringers," according to the ruling.

In other words, Tarantino did not allege that specific people clicked on the link and thus infringed the copyright, and without alleging specific infringement, he did not state a valid claim for contributory infringement.

STORY: Inside Tarantino's 'Hateful Eight' Reading

More from the ruling by U.S. District Judge John F. Walter: "Nowhere in these paragraphs or anywhere else in the complaint does Plaintiff allege a single act of direct infringement committed by any member of the general public that would support Plaintiff's claim for contributory infringement. Instead, Plaintiff merely speculates that some direct infringement must have taken place. For example, Plaintiff's complaint fails to allege the identity of a single third-party infringer, the date, the time, or the details of a single instance of third-party infringement, or, more importantly, how Defendant allegedly caused, induced, or materially contributed to the infringement by those third parties.

Tarantino and his attorney, Marty Singer, have been granted until May 1 to amend the complaint to address the flaws. We've reached out to Singer for comment.

Email: Matthew.Belloni@thr.com

Twitter: @THRMattBelloni