Skip to content

Bugfix/free downloads issue#78

Open
N64Core wants to merge 15 commits intoEmersont1:mainfrom
N64Core:bugfix/free_downloads_issue
Open

Bugfix/free downloads issue#78
N64Core wants to merge 15 commits intoEmersont1:mainfrom
N64Core:bugfix/free_downloads_issue

Conversation

@N64Core
Copy link
Contributor

@N64Core N64Core commented Mar 24, 2023

This PR effectively rewrites the load_game function and adds download key caching for faster single game downloads after the first one. The purpose of these changes is to fix an issue that would occur when an owned game possessed a free demo download, the result previously is that only the free demo content would be downloaded.

The caching of keys helps with this, but is not strictly necessary but will be useful for a full implementation of the feature requested by #67

@N64Core N64Core requested a review from Emersont1 March 30, 2023 04:08
@N64Core N64Core requested a review from Emersont1 April 15, 2023 03:42
"""Cleans a path on windows"""
if sys.platform in ["win32", "cygwin", "msys"]:
path_clean = re.sub(r"[<>:|?*\"\/\\]", "-", path)
# This checks for strings that end in ... or similar, weird corner case that affects fewer than 0.1% of titles
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this an issue? I don't want the renaming function to be overzealous, which it seems to be heading towards

self.downloads.append(d)
# This converts a null j.uploads into an empty dictionary and uses the safer .get accessor
if "uploads" in j:
j.update({"uploads": []})
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this just empties the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants