1
0
Fork 0
mirror of synced 2024-06-02 10:44:40 +12:00

Only auto sync in launch helper if enabled

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
This commit is contained in:
lennard 2023-03-03 00:47:10 +02:00 committed by loathingKernel
parent 45ecaa39f3
commit 901f339415
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD
2 changed files with 8 additions and 2 deletions

View file

@ -294,7 +294,7 @@ class RareLauncher(RareApp):
self.logger.error("Not logged in. Try to launch game offline")
args.offline = True
if not args.offline and self.rgame.game.supports_cloud_saves:
if not args.offline and self.rgame.auto_sync_saves:
logger.info("Start sync worker")
worker = SyncCheckWorker(self.core, self.rgame)
worker.signals.error_occurred.connect(self.error_occurred)

View file

@ -4,7 +4,7 @@ from enum import IntEnum
from logging import getLogger
from typing import Optional, List
from PyQt5.QtCore import QObject, pyqtSignal, QRunnable, QThreadPool
from PyQt5.QtCore import QObject, pyqtSignal, QRunnable, QThreadPool, QSettings
from legendary.models.game import SaveGameFile, SaveGameStatus, Game, InstalledGame
from rare.lgndr.core import LegendaryCore
@ -149,6 +149,12 @@ class RareGameSlim(RareGameBase):
"""
return "Win32" in self.game.asset_infos.keys()
@property
def auto_sync_saves(self):
return (
self.game.supports_cloud_saves or self.game.supports_mac_cloud_saves
) and QSettings().value(f"{self.app_name}/auto_sync_cloud", True, bool)
@property
def save_path(self) -> Optional[str]:
if self.igame is not None: