mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 23:22:08 +01:00
pikpak: set the NoMultiThreading feature flag to disable multi-thread copy
Before this change the pikpak backend changed the global --multi-thread-streams flag which wasn't desirable. Now the machinery is in place to use the NoMultiThreading feature flag instead. Fixes #6915
This commit is contained in:
parent
46a323ae14
commit
fcf47a8393
@ -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 {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user