diff --git a/qt/aqt/mediasync.py b/qt/aqt/mediasync.py index d105a098d..fd0238254 100644 --- a/qt/aqt/mediasync.py +++ b/qt/aqt/mediasync.py @@ -11,7 +11,8 @@ from typing import List, Union import aqt from anki import hooks from anki.consts import SYNC_BASE -from anki.rsbackend import TR, Interrupted, MediaSyncProgress, Progress, ProgressKind +from anki.rsbackend import TR, Interrupted, MediaSyncProgress, Progress, \ + ProgressKind, NetworkError from anki.types import assert_impossible from anki.utils import intTime from aqt import gui_hooks @@ -100,6 +101,10 @@ class MediaSyncer: if isinstance(exc, Interrupted): self._log_and_notify(tr(TR.SYNC_MEDIA_ABORTED)) return + elif isinstance(exc, NetworkError): + # avoid popups for network errors + self._log_and_notify(str(exc)) + return self._log_and_notify(tr(TR.SYNC_MEDIA_FAILED)) showWarning(str(exc))