Switch to the new server for downloading recipes/get books plugins

This commit is contained in:
Kovid Goyal 2015-01-11 18:49:02 +05:30
parent f19e9bc0b9
commit b0497d3c76
2 changed files with 3 additions and 7 deletions

View File

@ -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))

View File

@ -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