Skip to content

Commit 269a5bf

Browse files
committed
fix: nothing found
1 parent 502d482 commit 269a5bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/resources.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ func (s *Server) SearchTvAndDownload(c *gin.Context) (interface{}, error) {
123123
if err != nil {
124124
return nil, errors.Wrap(err, "download")
125125
}
126+
if len(name1) == 0 {
127+
return nil, fmt.Errorf("no torrent found")
128+
}
126129
name = name1[0]
127130
}
128131

0 commit comments

Comments
 (0)