From ed1cbfc87eaecf5aff777c9b0a9671c5ebaceda5 Mon Sep 17 00:00:00 2001 From: derrod Date: Fri, 7 Jan 2022 16:30:04 +0100 Subject: [PATCH] [cli] Select default app based on app compatibility --- legendary/cli.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/legendary/cli.py b/legendary/cli.py index af912a1..462e693 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -2238,9 +2238,15 @@ class LegendaryCLI: default_choice = None for i, bottle in enumerate(usable_bottles, start=1): extra = [] - if bottle['is_default'] and not default_choice and cx_version in bottle['cx_versions']: - default_choice = i - extra.append('default') + + if not default_choice and cx_version in bottle['cx_versions']: + if app_name in bottle['compatible_apps']: + default_choice = i + extra.append('default') + elif bottle['is_default']: + default_choice = i + extra.append('default') + if bottle['name'] in bottles: extra.append('installed')