fix(123pan): use local sort (close #6820)

This commit is contained in:
Andy Hsu
2024-07-21 20:29:32 +08:00
parent 2d57529e77
commit cbd4bef814
4 changed files with 14 additions and 11 deletions

View File

@ -17,6 +17,7 @@ import (
"github.com/alist-org/alist/v3/pkg/utils"
resty "github.com/go-resty/resty/v2"
jsoniter "github.com/json-iterator/go"
log "github.com/sirupsen/logrus"
)
// do others that not defined in Driver interface
@ -248,8 +249,8 @@ func (d *Pan123) getFiles(parentId string, name string) ([]File, error) {
"driveId": "0",
"limit": "100",
"next": "0",
"orderBy": d.OrderBy,
"orderDirection": d.OrderDirection,
"orderBy": "file_id",
"orderDirection": "desc",
"parentFileId": parentId,
"trashed": "false",
"SearchData": "",
@ -259,12 +260,13 @@ func (d *Pan123) getFiles(parentId string, name string) ([]File, error) {
"operateType": "4",
"inDirectSpace": "false",
}
_, err := d.request(FileList, http.MethodGet, func(req *resty.Request) {
_res, err := d.request(FileList, http.MethodGet, func(req *resty.Request) {
req.SetQueryParams(query)
}, &resp)
if err != nil {
return nil, err
}
log.Debug(string(_res))
page++
res = append(res, resp.Data.InfoList...)
total = resp.Data.Total