Skip to content

Commit

Permalink
Fix Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kzimir committed Apr 7, 2022
1 parent 6dd4656 commit 32be3b0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion minigalaxy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def get_download_version(self, game: Game):
else:
platform_version = game.get_info("platform")
return platform_version

def get_version(self, game: Game, gameinfo=None, dlc_name="") -> str:
if gameinfo is None:
gameinfo = self.get_info(game)
Expand Down
4 changes: 2 additions & 2 deletions minigalaxy/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, name: str, url: str = "", md5sum=None, game_id: int = 0, inst
self.status_file_path = self.get_status_file_path()
self.platform = self.get_info("platform") if self.get_info("platform") else platform
self.supported_platforms = [platform] if supported_platforms is None else supported_platforms

def get_stripped_name(self):
return self.__strip_string(self.name)

Expand Down Expand Up @@ -144,7 +144,7 @@ def set_install_dir(self):
def set_platform(self, platform):
self.platform = platform
self.set_info("platform", platform)

def __str__(self):
return self.name

Expand Down
9 changes: 6 additions & 3 deletions minigalaxy/ui/gametile.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,17 @@ def __update(self, save_location):
else:
self.image.set_tooltip_text(self.game.name)
for dlc in self.game.dlcs:
download_info = self.api.get_download_info(self.game, self.api.get_download_version(self.game), dlc_installers=dlc["downloads"]["installers"])
download_info = self.api.get_download_info(self.game, self.api.get_download_version(self.game),
dlc_installers=dlc["downloads"]["installers"])
if self.game.is_update_available(version_from_api=download_info["version"], dlc_title=dlc["title"]):
self.__download_dlc(dlc["downloads"]["installers"])

def __download_dlc(self, dlc_installers) -> None:
def finish_func(save_location):
self.__install_dlc(save_location, dlc_title=dlc_title)

download_info = self.api.get_download_info(self.game, self.api.get_download_version(self.game), dlc_installers=dlc_installers)
download_info = self.api.get_download_info(self.game, self.api.get_download_version(self.game),
dlc_installers=dlc_installers)
dlc_title = self.game.name
for dlc in self.game.dlcs:
if dlc["downloads"]["installers"] == dlc_installers:
Expand Down Expand Up @@ -400,7 +402,8 @@ def update_gtk_box_for_dlc(self, icon, title, installer):
self.dlc_horizontal_box.pack_start(dlc_box, False, True, 0)
dlc_box.show_all()
self.get_async_image_dlc_icon(icon, title)
download_info = self.api.get_download_info(self.game, self.api.get_download_version(self.game), dlc_installers=installer)
download_info = self.api.get_download_info(self.game, self.api.get_download_version(self.game),
dlc_installers=installer)
if self.game.is_update_available(version_from_api=download_info["version"], dlc_title=title):
icon_name = "emblem-synchronizing"
self.dlc_dict[title][0].set_sensitive(True)
Expand Down
2 changes: 1 addition & 1 deletion minigalaxy/ui/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Properties(Gtk.Dialog):
button_properties_ok = Gtk.Template.Child()
radiobutton_linux_type = Gtk.Template.Child()
radiobutton_windows_type = Gtk.Template.Child()

def __init__(self, parent, game, api):
Gtk.Dialog.__init__(self, title=_("Properties of {}").format(game.name), parent=parent.parent.parent,
modal=True)
Expand Down

0 comments on commit 32be3b0

Please sign in to comment.