minor fixes

Signed-off-by: anasty17 <e.anastayyar@gmail.com>
This commit is contained in:
anasty17 2024-01-05 23:46:39 +02:00
parent baebf0489f
commit 9b671f7f51
2 changed files with 9 additions and 26 deletions

View File

@ -163,28 +163,15 @@ class TaskConfig:
or "stop_duplicate" not in self.user_dict
and config_dict["STOP_DUPLICATE"]
)
default_upload = self.user_dict.get("default_upload", "")
if (
not self.upDest
and (
default_upload == "rc"
or not default_upload
and config_dict["DEFAULT_UPLOAD"] == "rc"
)
or self.upDest == "rc"
):
default_upload = (
self.user_dict.get("default_upload", "")
or config_dict["DEFAULT_UPLOAD"]
)
if (not self.upDest and default_upload == "rc") or self.upDest == "rc":
self.upDest = (
self.user_dict.get("rclone_path") or config_dict["RCLONE_PATH"]
)
if (
not self.upDest
and (
default_upload == "gd"
or not default_upload
and config_dict["DEFAULT_UPLOAD"] == "gd"
)
or self.upDest == "gd"
):
elif (not self.upDest and default_upload == "gd") or self.upDest == "gd":
self.upDest = (
self.user_dict.get("gdrive_id") or config_dict["GDRIVE_ID"]
)

View File

@ -325,9 +325,7 @@ class RcloneTransferHelper:
and not config_dict["RCLONE_FLAGS"]
and not self._listener.rcFlags
):
cmd += " --drive-chunk-size 64M --drive-upload-cutoff 32M"
elif remote_type != "drive":
cmd += " --retries-sleep 3s"
cmd.extend(("--drive-chunk-size", "128M", "--drive-upload-cutoff", "128M"))
result = await self._start_upload(cmd, remote_type)
if not result:
@ -384,10 +382,6 @@ class RcloneTransferHelper:
if not self._listener.rcFlags and not config_dict["RCLONE_FLAGS"]:
if src_remote_type == "drive" and dst_remote_type != "drive":
cmd.append("--drive-acknowledge-abuse")
elif dst_remote_type == "drive" and src_remote_type != "drive":
cmd.extend(
("--drive-chunk-size", "64M", "--drive-upload-cutoff", "32M")
)
elif src_remote_type == "drive":
cmd.extend(("--tpslimit", "3", "--transfers", "3"))
@ -443,6 +437,8 @@ class RcloneTransferHelper:
destination,
"--exclude",
ext,
"--retries-sleep",
"3s",
"--ignore-case",
"--low-level-retries",
"1",