Skip to content

Commit 9fba422

Browse files
authored
add --multi-thread-streams=0 for rclone version >= 1.60.0 (#402)
1 parent 06b95fa commit 9fba422

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

script/download-file/customize.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,17 @@ def preprocess(i):
234234
pre_clean = False
235235
if not verify_ssl:
236236
extra_download_options += " --no-check-certificate "
237+
# rlone fix : check rclone version to add --multi-thread-streams=0
238+
tmp_rclone_version = env.get('MLC_RCLONE_VERSION', '')
239+
if tmp_rclone_version == '':
240+
logger.warning(
241+
"MLC_RCLONE_VERSION not set, was get-rclone called as dependency?"
242+
)
243+
else:
244+
ref_version = list(map(int, "1.60.0".split('.')))
245+
rclone_version = list(map(int, tmp_rclone_version.split('.')))
246+
if rclone_version >= ref_version:
247+
extra_download_options += " --multi-thread-streams=0 "
237248
if env["MLC_HOST_OS_TYPE"] == "windows":
238249
# have to modify the variable from url to temp_url if it is
239250
# going to be used anywhere after this point

0 commit comments

Comments
 (0)