mirror of
https://github.com/ankitects/anki.git
synced 2025-12-11 13:56:55 -05:00
autosync media on startup
This commit is contained in:
parent
fdd850c0f0
commit
59a7993011
1 changed files with 7 additions and 0 deletions
|
|
@ -344,6 +344,8 @@ close the profile or restart Anki."""
|
||||||
if not self.loadCollection():
|
if not self.loadCollection():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self.maybe_auto_sync_media()
|
||||||
|
|
||||||
self.pm.apply_profile_options()
|
self.pm.apply_profile_options()
|
||||||
|
|
||||||
# show main window
|
# show main window
|
||||||
|
|
@ -856,6 +858,11 @@ title="%s" %s>%s</button>""" % (
|
||||||
# ok to sync
|
# ok to sync
|
||||||
self._sync()
|
self._sync()
|
||||||
|
|
||||||
|
def maybe_auto_sync_media(self) -> None:
|
||||||
|
if not self.pm.profile["autoSync"] or self.safeMode or self.restoringBackup:
|
||||||
|
return
|
||||||
|
self.media_syncer.start()
|
||||||
|
|
||||||
def _sync(self):
|
def _sync(self):
|
||||||
from aqt.sync import SyncManager
|
from aqt.sync import SyncManager
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue