From e4dc1253ae63baaef12cdf2c7485d9c94a00a16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lidwin?= Date: Thu, 27 Jul 2023 18:38:34 +0200 Subject: [PATCH] Specify runner in heroic protocol (#163) * improv: specify runner in heroic protocol to avoid appName collisions * Update styling Co-authored-by: kramo <93832451+kra-mo@users.noreply.github.com> --------- Co-authored-by: kramo <93832451+kra-mo@users.noreply.github.com> --- src/importer/sources/heroic_source.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/importer/sources/heroic_source.py b/src/importer/sources/heroic_source.py index 33b7f90..c06a266 100644 --- a/src/importer/sources/heroic_source.py +++ b/src/importer/sources/heroic_source.py @@ -97,6 +97,7 @@ class SubSourceIterable(Iterable): """Build a Game from a Heroic library entry""" app_name = entry["app_name"] + runner = entry["runner"] # Build game values = { @@ -107,7 +108,7 @@ class SubSourceIterable(Iterable): "game_id": self.source.game_id_format.format( service=self.service, game_id=app_name ), - "executable": self.source.executable_format.format(app_name=app_name), + "executable": self.source.executable_format.format(runner=runner, app_name=app_name), "hidden": self.source_iterable.is_hidden(app_name), } game = Game(values) @@ -359,7 +360,7 @@ class HeroicSource(URLExecutableSource): source_id = "heroic" name = _("Heroic") iterable_class = HeroicSourceIterable - url_format = "heroic://launch/{app_name}" + url_format = "heroic://launch/{runner}/{app_name}" available_on = {"linux", "win32"} locations = HeroicLocations(