mirror of
https://github.com/lutris/lutris
synced 2024-10-14 11:42:36 +00:00
Remove confusion about what the PGA is
This commit is contained in:
parent
3bfe0af614
commit
c464ece487
|
@ -147,7 +147,7 @@ def get_games_by_slug(slug):
|
|||
|
||||
|
||||
def add_game(**game_data):
|
||||
"""Add a game to the PGA database."""
|
||||
"""Add a game to the database."""
|
||||
game_data["installed_at"] = int(time.time())
|
||||
if "slug" not in game_data:
|
||||
game_data["slug"] = slugify(game_data["name"])
|
||||
|
@ -156,7 +156,7 @@ def add_game(**game_data):
|
|||
|
||||
def add_games_bulk(games):
|
||||
"""
|
||||
Add a list of games to the PGA database.
|
||||
Add a list of games to the database.
|
||||
The dicts must have an identical set of keys.
|
||||
|
||||
Args:
|
||||
|
@ -168,7 +168,7 @@ def add_games_bulk(games):
|
|||
|
||||
|
||||
def add_or_update(**params):
|
||||
"""Add a game to the PGA or update an existing one
|
||||
"""Add a game to the database or update an existing one
|
||||
|
||||
If an 'id' is provided in the parameters then it
|
||||
will try to match it, otherwise it will try matching
|
||||
|
|
|
@ -148,12 +148,12 @@ class Game(GObject.Object):
|
|||
@property
|
||||
def id(self) -> str:
|
||||
if not self._id:
|
||||
logger.error("The game '%s' has no ID, it is not stored in the PGA.", self.name)
|
||||
logger.error("The game '%s' has no ID, it is not stored in the database.", self.name)
|
||||
return cast(str, self._id)
|
||||
|
||||
@property
|
||||
def is_db_stored(self) -> bool:
|
||||
"""True if this Game has an ID, which means it is saved in the PGA."""
|
||||
"""True if this Game has an ID, which means it is saved in the database."""
|
||||
return bool(self._id)
|
||||
|
||||
@property
|
||||
|
|
|
@ -317,8 +317,7 @@ class GameActions(BaseGameActions):
|
|||
db_game["playtime"] = 0.0
|
||||
db_game["configpath"] = new_config_id
|
||||
db_game.pop("id")
|
||||
# Disconnect duplicate from service- there should be at most
|
||||
# 1 PGA game for a service game.
|
||||
# Disconnect duplicate from service- there should be at most 1 database game for a service game.
|
||||
db_game.pop("service", None)
|
||||
db_game.pop("service_id", None)
|
||||
|
||||
|
|
|
@ -390,7 +390,7 @@ class UninstallMultipleGamesDialog(Gtk.Dialog):
|
|||
|
||||
@property
|
||||
def delete_game(self) -> bool:
|
||||
"""True if the game should be rmoved from the PGA."""
|
||||
"""True if the game should be rmoved from the database."""
|
||||
if not self.game.is_installed:
|
||||
return True
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ class GameStore(GObject.Object):
|
|||
return True
|
||||
|
||||
def add_game(self, db_game):
|
||||
"""Add a PGA game to the store"""
|
||||
"""Add a game to the store"""
|
||||
store_item = StoreItem(db_game, self.service_media)
|
||||
self.add_item(store_item)
|
||||
|
||||
|
|
|
@ -84,7 +84,6 @@ class GameBar(Gtk.Box):
|
|||
self.play_button = self.get_play_button(game_actions)
|
||||
hbox.pack_start(self.play_button, False, False, 0)
|
||||
|
||||
|
||||
hbox.pack_start(self.get_runner_button(), False, False, 0)
|
||||
hbox.pack_start(self.get_platform_label(), False, False, 0)
|
||||
if self.game.lastplayed:
|
||||
|
|
|
@ -397,8 +397,7 @@ class BaseService(GObject.Object):
|
|||
return None
|
||||
|
||||
def get_service_db_game(self, game: Game):
|
||||
"""Returns the row dictionary for the service-game corresponding to the
|
||||
PGA game given, if any, or None."""
|
||||
"""Returns the row dictionary for the service-game corresponding to the game given, if any, or None."""
|
||||
if game.service == self.id and game.appid:
|
||||
return ServiceGameCollection.get_game(self.id, game.appid)
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue