Fix sukebei fromID search (#1722)
* Update sortmode.go * Update torrentParam.go
Cette révision appartient à :
Parent
213780f0eb
révision
1bbda2c96a
2 fichiers modifiés avec 4 ajouts et 3 suppressions
|
@ -21,7 +21,7 @@ type SortField struct {
|
|||
}
|
||||
|
||||
var sortFields = []SortField{
|
||||
{"id", "torrents.torrent_id"},
|
||||
{"id", config.Get().Models.TorrentsTableName + ".torrent_id"},
|
||||
{"name.raw", "torrent_name"},
|
||||
{"date", "date"},
|
||||
{"downloads", "downloads"},
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
elastic "gopkg.in/olivere/elastic.v5"
|
||||
|
||||
"github.com/NyaaPantsu/nyaa/config"
|
||||
"github.com/NyaaPantsu/nyaa/models"
|
||||
"github.com/NyaaPantsu/nyaa/models/torrents"
|
||||
"github.com/NyaaPantsu/nyaa/utils/log"
|
||||
|
@ -390,11 +391,11 @@ func (p *TorrentParam) toDBQuery(c *gin.Context) *Query {
|
|||
}
|
||||
|
||||
if p.FromID != 0 {
|
||||
query.Append("torrents.torrent_id > ?", p.FromID)
|
||||
query.Append(config.Get().Models.TorrentsTableName + ".torrent_id > ?", p.FromID)
|
||||
}
|
||||
if len(p.TorrentID) > 0 {
|
||||
for _, id := range p.TorrentID {
|
||||
query.Append("torrents.torrent_id = ?", id)
|
||||
query.Append(config.Get().Models.TorrentsTableName + ".torrent_id = ?", id)
|
||||
}
|
||||
}
|
||||
if p.FromDate != "" {
|
||||
|
|
Référencer dans un nouveau ticket