mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Select default app based on app compatibility
This commit is contained in:
parent
f7f13ed749
commit
ed1cbfc87e
|
@ -2238,9 +2238,15 @@ class LegendaryCLI:
|
||||||
default_choice = None
|
default_choice = None
|
||||||
for i, bottle in enumerate(usable_bottles, start=1):
|
for i, bottle in enumerate(usable_bottles, start=1):
|
||||||
extra = []
|
extra = []
|
||||||
if bottle['is_default'] and not default_choice and cx_version in bottle['cx_versions']:
|
|
||||||
|
if not default_choice and cx_version in bottle['cx_versions']:
|
||||||
|
if app_name in bottle['compatible_apps']:
|
||||||
default_choice = i
|
default_choice = i
|
||||||
extra.append('default')
|
extra.append('default')
|
||||||
|
elif bottle['is_default']:
|
||||||
|
default_choice = i
|
||||||
|
extra.append('default')
|
||||||
|
|
||||||
if bottle['name'] in bottles:
|
if bottle['name'] in bottles:
|
||||||
extra.append('installed')
|
extra.append('installed')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue