mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
update download missing dialog
This commit is contained in:
parent
2c946fe366
commit
174c5a703b
1 changed files with 5 additions and 2 deletions
|
@ -3061,12 +3061,15 @@ Consider backing up your media directory first."""))
|
||||||
def onDownloadMissingMedia(self):
|
def onDownloadMissingMedia(self):
|
||||||
res = downloadMissing(self.deck)
|
res = downloadMissing(self.deck)
|
||||||
if res is None:
|
if res is None:
|
||||||
ui.utils.showInfo(_("No media URLs defined for this deck."),
|
ui.utils.showInfo(_("No media URL defined for this deck."),
|
||||||
help="MediaSupport")
|
help="MediaSupport")
|
||||||
return
|
return
|
||||||
if res[0] == True:
|
if res[0] == True:
|
||||||
# success
|
# success
|
||||||
msg = _("%d successfully retrieved.") % res[1]
|
(grabbed, missing) = res[1:]
|
||||||
|
msg = _("%d successfully retrieved.") % grabbed
|
||||||
|
if missing:
|
||||||
|
msg += "\n" + _("%d missing.") % missing
|
||||||
else:
|
else:
|
||||||
msg = _("Unable to download %s\nDownload aborted.") % res[1]
|
msg = _("Unable to download %s\nDownload aborted.") % res[1]
|
||||||
ui.utils.showInfo(msg)
|
ui.utils.showInfo(msg)
|
||||||
|
|
Loading…
Reference in a new issue