mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-11 18:27:30 +01:00
News download scheduler: Don't tru to download news when no active internet connection is present (linux/windows only)
This commit is contained in:
parent
136d1e4a19
commit
3f2e08ba67
1 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
from calibre.web.feeds.recipes.model import RecipeModel
|
||||
from calibre.ptempfile import PersistentTemporaryFile
|
||||
from calibre.utils.date import utcnow
|
||||
from calibre.utils.network import internet_connected
|
||||
|
||||
class SchedulerDialog(QDialog, Ui_Dialog):
|
||||
|
||||
|
|
@ -304,6 +305,8 @@ def download_clicked(self, urn):
|
|||
self.download(urn)
|
||||
|
||||
def download(self, urn):
|
||||
if not internet_connected():
|
||||
return
|
||||
self.lock.lock()
|
||||
doit = urn not in self.download_queue
|
||||
self.lock.unlock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue