mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Switch to the new server for downloading recipes/get books plugins
This commit is contained in:
parent
f19e9bc0b9
commit
b0497d3c76
@ -23,7 +23,7 @@ class VersionMismatch(ValueError):
|
||||
ValueError.__init__(self, 'calibre too old')
|
||||
self.ver = ver
|
||||
|
||||
def download_updates(ver_map={}, server='https://status.calibre-ebook.com'):
|
||||
def download_updates(ver_map={}, server='https://code.calibre-ebook.com'):
|
||||
from calibre.utils.https import get_https_resource_securely
|
||||
data = {k:type(u'')(v) for k, v in ver_map.iteritems()}
|
||||
data['ver'] = '1'
|
||||
@ -192,8 +192,8 @@ if __name__ == '__main__':
|
||||
for name, code in download_updates():
|
||||
count += 1
|
||||
print(name)
|
||||
print(code)
|
||||
print(code.encode('utf-8'))
|
||||
print('\n', '_'*80, '\n', sep='')
|
||||
print ('Time to download all %d plugins: %.2f'%(count, time.time() - st))
|
||||
print ('Time to download all %d plugins: %.2f seconds'%(count, time.time() - st))
|
||||
|
||||
|
||||
|
@ -204,10 +204,6 @@ def get_builtin_recipe_titles():
|
||||
return [r.get('title') for r in get_builtin_recipe_collection()]
|
||||
|
||||
def download_builtin_recipe(urn):
|
||||
from calibre.utils.https import get_https_resource_securely
|
||||
return get_https_resource_securely('https://status.calibre-ebook.com/recipe/'+urn)
|
||||
|
||||
def download_builtin_recipe2(urn):
|
||||
from calibre.utils.config_base import prefs
|
||||
from calibre.utils.https import get_https_resource_securely
|
||||
import bz2
|
||||
|
Loading…
x
Reference in New Issue
Block a user