diff --git a/lnbits/app.py b/lnbits/app.py index 8348112b..050b7860 100644 --- a/lnbits/app.py +++ b/lnbits/app.py @@ -154,7 +154,7 @@ async def check_installed_extensions(app: FastAPI): for ext in installed_extensions: try: - installed = check_installed_extension(ext) + installed = check_installed_extension_files(ext) if not installed: await restore_installed_extension(app, ext) logger.info( @@ -187,13 +187,11 @@ async def build_all_installed_extensions_list() -> List[InstallableExtension]: id=ext_id, name=ext_id, installed_release=release, icon=release.icon ) installed_extensions.append(ext_info) - await add_installed_extension(ext_info) - await update_installed_extension_state(ext_id=ext_id, active=True) return installed_extensions -def check_installed_extension(ext: InstallableExtension) -> bool: +def check_installed_extension_files(ext: InstallableExtension) -> bool: if ext.has_installed_version: return True @@ -209,6 +207,9 @@ def check_installed_extension(ext: InstallableExtension) -> bool: async def restore_installed_extension(app: FastAPI, ext: InstallableExtension): + await add_installed_extension(ext) + await update_installed_extension_state(ext_id=ext.id, active=True) + extension = Extension.from_installable_ext(ext) register_ext_routes(app, extension) diff --git a/lnbits/core/templates/core/extensions.html b/lnbits/core/templates/core/extensions.html index bf5ef809..f2220912 100644 --- a/lnbits/core/templates/core/extensions.html +++ b/lnbits/core/templates/core/extensions.html @@ -108,7 +108,8 @@ class="text-subtitle2 gt-sm" style="font-size: 11px; height: 34px" > - {{ extension.shortDescription }} + {{ extension.shortDescription || + extension.installedRelease?.description }}
{{ extension.name }}