diff --git a/src/calibre/ebooks/conversion/plugins/recipe_input.py b/src/calibre/ebooks/conversion/plugins/recipe_input.py index 0b69b66a69..477c4a434c 100644 --- a/src/calibre/ebooks/conversion/plugins/recipe_input.py +++ b/src/calibre/ebooks/conversion/plugins/recipe_input.py @@ -79,7 +79,7 @@ class RecipeInput(InputFormatPlugin): if rtype == 'custom': self.recipe_source = get_custom_recipe(recipe_id) else: - self.recipe_source = get_builtin_recipe_by_id(urn) + self.recipe_source = get_builtin_recipe_by_id(urn, log=log, download_recipe=True) if not self.recipe_source: raise ValueError('Could not find recipe with urn: ' + urn) if not isinstance(self.recipe_source, bytes): diff --git a/src/calibre/web/feeds/recipes/collection.py b/src/calibre/web/feeds/recipes/collection.py index 80e735dd42..971d78fa67 100644 --- a/src/calibre/web/feeds/recipes/collection.py +++ b/src/calibre/web/feeds/recipes/collection.py @@ -218,8 +218,11 @@ def download_builtin_recipe(urn): from calibre.utils.config_base import prefs from calibre.utils.https import get_https_resource_securely import bz2 - return bz2.decompress(get_https_resource_securely( + recipe_source = bz2.decompress(get_https_resource_securely( 'https://code.calibre-ebook.com/recipe-compressed/'+urn, headers={'CALIBRE-INSTALL-UUID':prefs['installation_uuid']})) + from calibre.web.feeds.recipes import compile_recipe + compile_recipe(recipe_source) # ensure the downloaded recipe is at least compile-able + return recipe_source def get_builtin_recipe(urn):