Skip to content

Fix: ensure rclone stats JSON objects are parsed on all log levels - #22

Merged
gulp79 merged 1 commit into
gulp79:masterfrom
Forcosigan:fix-rclone-stats-parsing
Oct 21, 2026
Merged

gulp79 merged 1 commit into
gulp79:masterfrom
Forcosigan:fix-rclone-stats-parsing

Conversation

@Forcosigan

Copy link
Copy Markdown

Problem

When scheduled sync tasks complete, notifications and log reports frequently state that 0 files were transferred ("No changes detected"), even when files were actually synced.

Cause

In SyncWorker.kt, log lines received via stderr are only routed to statusObject.parseLoglineToStatusObject(logline) if level == "error" or level == "warning". Since rclone outputs periodic transfer statistics as JSON lines with level == "notice" or level == "info", these lines are skipped. As a result, mStats remains empty and statusObject.getTotalTransfers() returns 0.

Solution

Allow parsing of log lines containing the "stats" key:

} else if (logline.getString("level") == "warning" || logline.has("stats")) {
    statusObject.parseLoglineToStatusObject(logline)
}

@Forcosigan
Forcosigan force-pushed the fix-rclone-stats-parsing branch from e87684c to 895c55f Compare October 15, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants