Identifier is now full app name(with version), so same app won't launch twice if two versions are available.

This commit is contained in:
Jakub Trllo 2018-12-06 15:20:05 +01:00
parent c5c6927e61
commit e19fbea3e9
2 changed files with 3 additions and 4 deletions

View file

@ -9,7 +9,7 @@ from app.api import Logger
log = Logger.getLogger(__name__)
def registerApp(app, session):
name = app['name'].split("_")[0]
name = app['name'].replace("_", ".")
variant = ""
try:
variant = app['name'].split("_")[1]
@ -59,6 +59,7 @@ def register(session):
appNames.append(app['name'])
apps.append(app)
apps = sorted(apps, key=lambda x: x['name'])
for app in apps:
try:
registerApp(app, session)

View file

@ -72,9 +72,7 @@ class AppAction(object):
),
self._launch
)
self.log.info("Application '{}' - Registered successfully".format(self.label))
self.log.info("Application '{}' - Registered successfully".format(self.label))
self.log.info("Application '{} {}' - Registered successfully".format(self.label,self.variant))
def _discover(self, event):
args = self._translate_event(