Added search refine back end
Cette révision appartient à :
Parent
fce83bcdb9
révision
5d6962f3a5
1 fichiers modifiés avec 4 ajouts et 3 suppressions
|
@ -72,8 +72,9 @@ func (p *TorrentParam) FromRequest(c *gin.Context) {
|
||||||
if c.Query("order") == "true" {
|
if c.Query("order") == "true" {
|
||||||
ascending = true
|
ascending = true
|
||||||
}
|
}
|
||||||
|
langs := c.QueryArray("lang")
|
||||||
|
|
||||||
language := ParseLanguages(c.Query("lang"))
|
language := ParseLanguages(strings.Join(langs, ","))
|
||||||
|
|
||||||
p.NameLike = nameLike
|
p.NameLike = nameLike
|
||||||
p.Max = uint32(max)
|
p.Max = uint32(max)
|
||||||
|
@ -152,7 +153,7 @@ func (p *TorrentParam) ToFilterQuery() string {
|
||||||
query += " filesize: [* " + sMaxSize + "]"
|
query += " filesize: [* " + sMaxSize + "]"
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(p.Languages) > 0{
|
if len(p.Languages) > 0 {
|
||||||
for _, val := range p.Languages {
|
for _, val := range p.Languages {
|
||||||
query += " language: " + val.Code
|
query += " language: " + val.Code
|
||||||
}
|
}
|
||||||
|
|
Référencer dans un nouveau ticket