fix: nothing found

This commit is contained in:
Simon Ding
2025-04-23 10:53:15 +08:00
parent 502d482ea9
commit 269a5bf030

View File

@@ -123,6 +123,9 @@ func (s *Server) SearchTvAndDownload(c *gin.Context) (interface{}, error) {
if err != nil {
return nil, errors.Wrap(err, "download")
}
if len(name1) == 0 {
return nil, fmt.Errorf("no torrent found")
}
name = name1[0]
}