mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/nialldaley/calibre
This commit is contained in:
commit
814bfc8afc
@ -567,3 +567,9 @@ show_saved_search_box = False
|
|||||||
# exclude_fields_on_paste = ['cover', 'timestamp', '#mycolumn']
|
# exclude_fields_on_paste = ['cover', 'timestamp', '#mycolumn']
|
||||||
# to prevent pasting of the cover, Date and custom column, mycolumn.
|
# to prevent pasting of the cover, Date and custom column, mycolumn.
|
||||||
exclude_fields_on_paste = []
|
exclude_fields_on_paste = []
|
||||||
|
|
||||||
|
#: Skip internet connected check
|
||||||
|
# Skip checking whether the internet is available before downloading news.
|
||||||
|
# Useful if for some reason your operating systems network checking
|
||||||
|
# facilities are not reliable (for example NetworkManager on Linux).
|
||||||
|
skip_network_check = False
|
||||||
|
@ -7,6 +7,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
|||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
from calibre.constants import iswindows, islinux, isbsd
|
from calibre.constants import iswindows, islinux, isbsd
|
||||||
|
from calibre.utils.config_base import tweaks
|
||||||
|
|
||||||
|
|
||||||
class LinuxNetworkStatus(object):
|
class LinuxNetworkStatus(object):
|
||||||
@ -49,10 +50,13 @@ class DummyNetworkStatus(object):
|
|||||||
def __call__(self):
|
def __call__(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
_network_status = WindowsNetworkStatus() if iswindows else \
|
_network_status = WindowsNetworkStatus() if iswindows else \
|
||||||
LinuxNetworkStatus() if (islinux or isbsd) else \
|
LinuxNetworkStatus() if (islinux or isbsd) else \
|
||||||
DummyNetworkStatus()
|
DummyNetworkStatus()
|
||||||
|
|
||||||
|
|
||||||
def internet_connected():
|
def internet_connected():
|
||||||
|
if tweaks['skip_network_check']:
|
||||||
|
return True
|
||||||
return _network_status()
|
return _network_status()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user