diff --git a/drivers/quark/meta.go b/drivers/quark/meta.go index a8b64df274c..31ed0eb6002 100644 --- a/drivers/quark/meta.go +++ b/drivers/quark/meta.go @@ -8,7 +8,7 @@ import ( type Addition struct { Cookie string `json:"cookie" required:"true"` driver.RootID - OrderBy string `json:"order_by" type:"select" options:"file_type,file_name,updated_at" default:"file_name"` + OrderBy string `json:"order_by" type:"select" options:"none,file_type,file_name,updated_at" default:"none"` OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"` } diff --git a/drivers/quark/util.go b/drivers/quark/util.go index a97e4a79427..0627c904636 100644 --- a/drivers/quark/util.go +++ b/drivers/quark/util.go @@ -62,7 +62,9 @@ func (d *Quark) GetFiles(parent string) ([]File, error) { "pdir_fid": parent, "_size": strconv.Itoa(size), "_fetch_total": "1", - "_sort": "file_type:asc," + d.OrderBy + ":" + d.OrderDirection, + } + if d.OrderBy != "none" { + query["_sort"] = "file_type:asc," + d.OrderBy + ":" + d.OrderDirection } for { query["_page"] = strconv.Itoa(page)