Skip to content

Commit

Permalink
Fix Windows games with multiple parts not installing
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter committed Nov 26, 2024
1 parent 7061451 commit 77f9a16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**1.3.1**
- Fix Windows games with multiple parts not installing with wine
- Minor AppData fixes (thanks to tim77)
- Added Portuguese translation (thanks to GLSWV)

Expand Down
8 changes: 3 additions & 5 deletions minigalaxy/ui/gametile.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,9 @@ def wrapper(*args):
break
info = self.api.get_download_file_info(file_info["downlink"])
total_file_size += info.size
try:
# Extract the filename from the download url (filename is between %2F and &token)
filename = urllib.parse.unquote(re.search('%2F(((?!%2F).)*)&t', download_url).group(1))
except AttributeError:
filename = "{}-{}.bin".format(self.game.get_stripped_name(), key)
# Extract the filename from the download url (filename is between %2F and &token)
filename = urllib.parse.unquote(urllib.parse.urlsplit(download_url).path)
filename = filename.split("/")[-1]
download_path = os.path.join(self.download_dir, filename)
if info.md5:
self.game.md5sum[os.path.basename(download_path)] = info.md5
Expand Down

0 comments on commit 77f9a16

Please sign in to comment.