From ff022119c32af3a752d6fdea8f7e21aaf94c0e6a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 9 Dec 2010 12:52:08 +0900 Subject: [PATCH] abort download missing media early --- ankiqt/ui/main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 194cd313f..7ddb1a300 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -2945,10 +2945,12 @@ Consider backing up your media directory first.""")) ui.utils.showInfo(_("No media URLs defined for this deck."), help="MediaSupport") return - ui.utils.showInfo(ngettext("%d missing file found.
", - "%d missing files found.
", res[0]) % res[0] + - _("%d successfully retrieved.") - % res[1], parent=self) + if res[0] == True: + # success + msg = _("%d successfully retrieved.") % res[1] + else: + msg = _("Unable to download %s\nDownload aborted.") % res[1] + ui.utils.showInfo(msg) def addHook(self, *args): addHook(*args)