rclone-api 1.0.52__py2.py3-none-any.whl → 1.0.54__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rclone_api/rclone.py +22 -7
- {rclone_api-1.0.52.dist-info → rclone_api-1.0.54.dist-info}/METADATA +1 -1
- {rclone_api-1.0.52.dist-info → rclone_api-1.0.54.dist-info}/RECORD +7 -7
- {rclone_api-1.0.52.dist-info → rclone_api-1.0.54.dist-info}/LICENSE +0 -0
- {rclone_api-1.0.52.dist-info → rclone_api-1.0.54.dist-info}/WHEEL +0 -0
- {rclone_api-1.0.52.dist-info → rclone_api-1.0.54.dist-info}/entry_points.txt +0 -0
- {rclone_api-1.0.52.dist-info → rclone_api-1.0.54.dist-info}/top_level.txt +0 -0
rclone_api/rclone.py
CHANGED
@@ -274,6 +274,8 @@ class Rclone:
|
|
274
274
|
files: list[str],
|
275
275
|
check=True,
|
276
276
|
verbose: bool | None = None,
|
277
|
+
checkers: int | None = None,
|
278
|
+
transfers: int | None = None,
|
277
279
|
other_args: list[str] | None = None,
|
278
280
|
) -> list[CompletedProcess]:
|
279
281
|
"""Copy multiple files from source to destination.
|
@@ -281,6 +283,8 @@ class Rclone:
|
|
281
283
|
Args:
|
282
284
|
payload: Dictionary of source and destination file paths
|
283
285
|
"""
|
286
|
+
checkers = checkers or 1000
|
287
|
+
transfers = transfers or 32
|
284
288
|
verbose = get_verbose(verbose)
|
285
289
|
payload: list[str] = convert_to_filestr_list(files)
|
286
290
|
if len(payload) == 0:
|
@@ -301,10 +305,7 @@ class Rclone:
|
|
301
305
|
for common_prefix, files in datalists.items():
|
302
306
|
|
303
307
|
def _task(files=files) -> subprocess.CompletedProcess:
|
304
|
-
|
305
|
-
nfiles = len(files)
|
306
|
-
files_str = "\n".join(files)
|
307
|
-
print(f"Copying {nfiles} files: \n{files_str}")
|
308
|
+
|
308
309
|
with TemporaryDirectory() as tmpdir:
|
309
310
|
include_files_txt = Path(tmpdir) / "include_files.txt"
|
310
311
|
include_files_txt.write_text("\n".join(files), encoding="utf-8")
|
@@ -314,6 +315,13 @@ class Rclone:
|
|
314
315
|
else:
|
315
316
|
src_path = src
|
316
317
|
dst_path = dst
|
318
|
+
|
319
|
+
if verbose:
|
320
|
+
nfiles = len(files)
|
321
|
+
files_fqdn = [f"{src_path}/{f}" for f in files]
|
322
|
+
files_str = "\n".join(files_fqdn)
|
323
|
+
print(f"Copying {nfiles} files: \n{files_str}")
|
324
|
+
|
317
325
|
# print(include_files_txt)
|
318
326
|
cmd_list: list[str] = [
|
319
327
|
"copy",
|
@@ -322,12 +330,19 @@ class Rclone:
|
|
322
330
|
"--files-from",
|
323
331
|
str(include_files_txt),
|
324
332
|
"--checkers",
|
325
|
-
|
333
|
+
str(checkers),
|
326
334
|
"--transfers",
|
327
|
-
|
335
|
+
str(transfers),
|
328
336
|
]
|
329
337
|
if verbose:
|
330
|
-
|
338
|
+
if other_args is not None and not any(
|
339
|
+
["-v" in x for x in other_args]
|
340
|
+
):
|
341
|
+
cmd_list.append("-vvvv")
|
342
|
+
if other_args is not None and not any(
|
343
|
+
["--progress" in x for x in other_args]
|
344
|
+
):
|
345
|
+
cmd_list.append("--progress")
|
331
346
|
if other_args is not None:
|
332
347
|
cmd_list += other_args
|
333
348
|
out = self._run(cmd_list, capture=not verbose)
|
@@ -12,16 +12,16 @@ rclone_api/file.py,sha256=YtR5Y6c0YfXTS-sReOy2UgiSnafcAeO6b2hnbojBQD4,1423
|
|
12
12
|
rclone_api/filelist.py,sha256=xbiusvNgaB_b_kQOZoHMJJxn6TWGtPrWd2J042BI28o,767
|
13
13
|
rclone_api/group_files.py,sha256=kOHh6ysFDkxjldSwvW6KqmiADUC1yFCdrZRY57TvbGY,5328
|
14
14
|
rclone_api/process.py,sha256=RrMfTe0bndmJ6gBK67ioqNvCstJ8aTC8RlGX1XBLlcw,4191
|
15
|
-
rclone_api/rclone.py,sha256=
|
15
|
+
rclone_api/rclone.py,sha256=YVlluoHWtt3WTI4TPSloD5EFQdwiZjE6ryEPAfFRH2M,24257
|
16
16
|
rclone_api/remote.py,sha256=c9hlRKBCg1BFB9MCINaQIoCg10qyAkeqiS4brl8ce-8,343
|
17
17
|
rclone_api/rpath.py,sha256=8ZA_1wxWtskwcy0I8V2VbjKDmzPkiWd8Q2JQSvh-sYE,2586
|
18
18
|
rclone_api/util.py,sha256=IWNOOcPE0xdKvehzXQ9okIppGDBYWJPIfdbUME8BFVM,4015
|
19
19
|
rclone_api/walk.py,sha256=kca0t1GAnF6FLclN01G8NG__Qe-ggodLtAbQSHyVPng,2968
|
20
20
|
rclone_api/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
21
21
|
rclone_api/cmd/list_files.py,sha256=x8FHODEilwKqwdiU1jdkeJbLwOqUkUQuDWPo2u_zpf0,741
|
22
|
-
rclone_api-1.0.
|
23
|
-
rclone_api-1.0.
|
24
|
-
rclone_api-1.0.
|
25
|
-
rclone_api-1.0.
|
26
|
-
rclone_api-1.0.
|
27
|
-
rclone_api-1.0.
|
22
|
+
rclone_api-1.0.54.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
23
|
+
rclone_api-1.0.54.dist-info/METADATA,sha256=DUbIDJU4BtQAsM0wVePLu5YR_0-BzU73eBCtX8IJ6u4,4489
|
24
|
+
rclone_api-1.0.54.dist-info/WHEEL,sha256=9Hm2OB-j1QcCUq9Jguht7ayGIIZBRTdOXD1qg9cCgPM,109
|
25
|
+
rclone_api-1.0.54.dist-info/entry_points.txt,sha256=XUoTX3m7CWxdj2VAKhEuO0NMOfX2qf-OcEDFwdyk9ZE,72
|
26
|
+
rclone_api-1.0.54.dist-info/top_level.txt,sha256=EvZ7uuruUpe9RiUyEp25d1Keq7PWYNT0O_-mr8FCG5g,11
|
27
|
+
rclone_api-1.0.54.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|