We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9d87e9 commit bbd1cddCopy full SHA for bbd1cdd
1 file changed
rclone_python/utils.py
@@ -112,6 +112,17 @@ def rclone_progress(
112
113
114
def extract_rclone_progress(line: str) -> Tuple[bool, Union[Dict[str, Any], None]]:
115
+ """Extracts and returns the progress updates from the rclone transfer operation.
116
+ The returned Dictionary includes the original rclone stats output inside of "rclone_output".
117
+ All file sizes and speeds are give in bytes.
118
+
119
+ Args:
120
+ line (str): One output line of the rclone transfer operation with the --use-json-log flag enabled.
121
122
+ Returns:
123
+ Tuple[bool, Union[Dict[str, Any], None]]: The retrieved update Dictionary.
124
+ """
125
126
try:
127
stats: Dict = json.loads(line).get("stats", None)
128
except ValueError:
0 commit comments