mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
fix(releases): use case-insensitive searching (#1092)
* fix(web/search): use case-insensitive searching for releases * to the moon
This commit is contained in:
parent
5b01aa14b7
commit
0cd560d7f3
1 changed files with 5 additions and 1 deletions
|
@ -152,7 +152,11 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
|
|||
}
|
||||
|
||||
if len(search) != 0 {
|
||||
whereQueryBuilder = append(whereQueryBuilder, sq.Like{"r.torrent_name": search + "%"})
|
||||
if len(whereQueryBuilder) > 1 {
|
||||
whereQueryBuilder = append(whereQueryBuilder, ILike("r.torrent_name", "%"+search+"%"))
|
||||
} else {
|
||||
whereQueryBuilder = append(whereQueryBuilder, ILike("r.torrent_name", search+"%"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue