Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

pikpak: set the NoMultiThreading feature flag to disable multi-thread copy

Nick Craig-Woodfcf47a83934a
diff --git a/backend/pikpak/pikpak.go b/backend/pikpak/pikpak.go
index 2fba6b028..616f62607 100644
--- a/backend/pikpak/pikpak.go
+++ b/backend/pikpak/pikpak.go
@@ -189,11 +189,6 @@ Fill in for rclone to use a non root folder as its starting point.
Help: "Files bigger than this will be cached on disk to calculate hash if required.",
Default: fs.SizeSuffix(10 * 1024 * 1024),
Advanced: true,
- }, {
- Name: "multi_thread_streams",
- Help: "Max number of streams to use for multi-thread downloads.\n\nThis will override global flag `--multi-thread-streams` and defaults to 1 to avoid rate limiting.",
- Default: 1,
- Advanced: true,
}, {
Name: config.ConfigEncoding,
Help: config.ConfigEncodingHelp,
@@ -224,7 +219,6 @@ type Options struct {
UseTrash bool `config:"use_trash"`
TrashedOnly bool `config:"trashed_only"`
HashMemoryThreshold fs.SizeSuffix `config:"hash_memory_limit"`
- MultiThreadStreams int `config:"multi_thread_streams"`
Enc encoder.MultiEncoder `config:"encoding"`
}
@@ -437,10 +431,6 @@ func newFs(ctx context.Context, name, path string, m configmap.Mapper) (*Fs, err
root := parsePath(path)
- // overrides global `--multi-thread-streams` by local one
- ci := fs.GetConfig(ctx)
- ci.MultiThreadStreams = opt.MultiThreadStreams
-
f := &Fs{
name: name,
root: root,
@@ -451,6 +441,7 @@ func newFs(ctx context.Context, name, path string, m configmap.Mapper) (*Fs, err
f.features = (&fs.Features{
ReadMimeType: true, // can read the mime type of objects
CanHaveEmptyDirectories: true, // can have empty directories
+ NoMultiThreading: true, // can't have multiple threads downloading
}).Fill(ctx, f)
if err := f.newClientWithPacer(ctx); err != nil {
diff --git a/docs/content/pikpak.md b/docs/content/pikpak.md
index b9096aa9a..f20ba3c9e 100644
--- a/docs/content/pikpak.md
+++ b/docs/content/pikpak.md
@@ -220,19 +220,6 @@ Properties:
- Type: SizeSuffix
- Default: 10Mi
-#### --pikpak-multi-thread-streams
-
-Max number of streams to use for multi-thread downloads.
-
-This will override global flag `--multi-thread-streams` and defaults to 1 to avoid rate limiting.
-
-Properties:
-
-- Config: multi_thread_streams
-- Env Var: RCLONE_PIKPAK_MULTI_THREAD_STREAMS
-- Type: int
-- Default: 1
-
#### --pikpak-encoding
The encoding for the backend.