Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/free downloads issue #78

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

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

itchiodl/game.py Outdated Show resolved Hide resolved
itchiodl/library.py Outdated Show resolved Hide resolved
itchiodl/library.py Outdated Show resolved Hide resolved
itchiodl/library.py Outdated Show resolved Hide resolved
itchiodl/library.py Outdated Show resolved Hide resolved
@N64Core N64Core requested a review from Emersont1 March 30, 2023 04:08
itchiodl/game.py Outdated Show resolved Hide resolved
@N64Core N64Core requested a review from Emersont1 April 15, 2023 03:42
@@ -41,6 +41,8 @@ def clean_path(path):
"""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