mirror of
https://github.com/rclone/rclone.git
synced 2025-01-13 20:38:12 +02:00
drive: reduce bandwidth by adding fields for partial responses
Fixes #1346
This commit is contained in:
parent
84d4d7f9d9
commit
d7df065320
@ -84,6 +84,7 @@ var (
|
|||||||
"text/tab-separated-values": "tsv",
|
"text/tab-separated-values": "tsv",
|
||||||
}
|
}
|
||||||
extensionToMimeType map[string]string
|
extensionToMimeType map[string]string
|
||||||
|
partialFields = googleapi.Field("items(id,downloadUrl,exportLinks,fileExtension,fullFileExtension,fileSize,labels,md5Checksum,modifiedDate,mimeType,title,owners)")
|
||||||
)
|
)
|
||||||
|
|
||||||
// Register with Fs
|
// Register with Fs
|
||||||
@ -242,7 +243,7 @@ OUTER:
|
|||||||
for {
|
for {
|
||||||
var files *drive.FileList
|
var files *drive.FileList
|
||||||
err = f.pacer.Call(func() (bool, error) {
|
err = f.pacer.Call(func() (bool, error) {
|
||||||
files, err = list.Do()
|
files, err = list.Fields(partialFields).Do()
|
||||||
return shouldRetry(err)
|
return shouldRetry(err)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user