Skip to content

Commit 32496c6

Browse files
authored
Merge pull request #55 from GedasFX/fix/bisync
Use correct key in config, not just the second key
2 parents 374b8b2 + 31ada04 commit 32496c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,16 @@ async def get_backend_type(self):
129129
async def sync_now(self):
130130
logger.debug("Executing: sync_now()")
131131

132-
if _get_config()[1][1] == "true":
132+
config = _get_config()
133+
134+
if next((x[1] for x in config if x[0] == "bisync_enabled"), "false") == "true":
133135
sync_command = "bisync"
134136
logger.debug("using bisync")
135137
else:
136138
sync_command = "copy"
137139
logger.debug("using copy")
138140

139-
destination_path = next((x[1] for x in _get_config() if x[0] == "destination_directory"), "decky-cloud-save")
141+
destination_path = next((x[1] for x in config if x[0] == "destination_directory"), "decky-cloud-save")
140142

141143
logger.debug("Running command: %s %s --filter-from %s / backend:%s --copy-links", rclone_bin, sync_command, cfg_syncpath_filter_file, destination_path)
142144
self.current_sync = await asyncio.subprocess.create_subprocess_exec(rclone_bin, *[sync_command, "--filter-from", cfg_syncpath_filter_file, "/", f"backend:{destination_path}", "--copy-links"])

0 commit comments

Comments
 (0)