mirror of
https://github.com/lutris/lutris
synced 2024-10-14 19:53:53 +00:00
Fix incorrect or inconsistent slug generation.
Only scummvm uses "lutris_slug" but it is provided for Gog too - with stale data.
This commit is contained in:
parent
0e96bed1f7
commit
659bc241da
|
@ -641,10 +641,6 @@ class AmazonService(OnlineService):
|
|||
return [file_collection], []
|
||||
|
||||
def get_installed_slug(self, db_game):
|
||||
slug = db_game.get("lutris_slug")
|
||||
if slug:
|
||||
return slug
|
||||
|
||||
details = json.loads(db_game["details"])
|
||||
return slugify(details["product"]["title"])
|
||||
|
||||
|
|
|
@ -263,8 +263,8 @@ class BaseService(GObject.Object):
|
|||
def get_installed_slug(self, db_game):
|
||||
"""Returns the slug the game will have after installation, by default. This
|
||||
is Lutris's slug, not the one for the service. By default, we derive it from
|
||||
the Game's name, but services override this if they provide the slug."""
|
||||
return db_game.get("lutris_slug") or slugify(db_game["name"])
|
||||
the Game's name."""
|
||||
return slugify(db_game["name"])
|
||||
|
||||
def get_installed_runner_name(self, db_game):
|
||||
"""Returns the name of the runner this game will have after installation, or
|
||||
|
|
|
@ -156,7 +156,7 @@ class BattleNetService(BaseService):
|
|||
return slug
|
||||
|
||||
def get_installed_slug(self, db_game):
|
||||
return db_game.get("lutris_slug") or db_game["slug"]
|
||||
return db_game["slug"]
|
||||
|
||||
def generate_installer(self, db_game, egs_db_game):
|
||||
egs_game = Game(egs_db_game["id"])
|
||||
|
|
|
@ -328,7 +328,7 @@ class ItchIoService(OnlineService):
|
|||
return all_extras
|
||||
|
||||
def get_installed_slug(self, db_game):
|
||||
return db_game.get("lutris_slug") or db_game["slug"]
|
||||
return db_game["slug"]
|
||||
|
||||
def generate_installer(self, db_game):
|
||||
"""Auto generate installer for itch.io game"""
|
||||
|
|
|
@ -71,6 +71,9 @@ class ScummvmService(BaseService):
|
|||
}
|
||||
}
|
||||
|
||||
def get_installed_slug(self, db_game):
|
||||
return db_game.get("lutris_slug") or slugify(db_game["name"])
|
||||
|
||||
def get_installed_runner_name(self, db_game):
|
||||
return "scummvm"
|
||||
|
||||
|
|
Loading…
Reference in a new issue