diff --git a/utils/search/torrentParam.go b/utils/search/torrentParam.go index 5c1b00e1..839e4da9 100644 --- a/utils/search/torrentParam.go +++ b/utils/search/torrentParam.go @@ -342,7 +342,9 @@ func (p *TorrentParam) FindES(c *gin.Context, client *elastic.Client) ([]models. func (p *TorrentParam) toDBQuery(c *gin.Context) *Query { query := &Query{} - query.Append(p.Category.ToDBQuery()) + sql, cats := p.Category.ToDBQuery() + query.Append(sql, cats...) + if len(p.Languages) > 0 { query.Append("language "+searchOperator, "%"+langsToDBQuery(p.Languages)+"%") }