fix predb sorting

This commit is contained in:
lyx0 2023-12-17 17:38:00 +01:00
parent 15956b235b
commit 146c04be0c

View file

@ -108,7 +108,7 @@ type searchSingleResult struct {
} }
func (app *application) PreDBSearch(title string) string { func (app *application) PreDBSearch(title string) string {
escaped := fmt.Sprintf("https://api.predb.net/?q=%s&order_by=release&sort=asc&limit=100", url.QueryEscape(title)) escaped := fmt.Sprintf("https://api.predb.net/?q=%s&order_by=pretime&sort=desc&limit=100", url.QueryEscape(title))
resp, err := http.Get(escaped) resp, err := http.Get(escaped)
if err != nil { if err != nil {
@ -164,7 +164,7 @@ func (app *application) PreDBSearch(title string) string {
} }
func (app *application) PreDBGroup(group string) string { func (app *application) PreDBGroup(group string) string {
escaped := fmt.Sprintf("https://api.predb.net/?group=%s&order_by=release&sort=asc&limit=100", url.QueryEscape(group)) escaped := fmt.Sprintf("https://api.predb.net/?group=%s&order_by=pretime&sort=desc&limit=100", url.QueryEscape(group))
resp, err := http.Get(escaped) resp, err := http.Get(escaped)
if err != nil { if err != nil {