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

Fix issue where --download-game throws an error when downloading free games #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

triple-j
Copy link
Contributor

Downloading of free games stopped working.

Running itch-download --download-game "https://nomnomnami.itch.io/charm-studies" --api-key xxx returns the following error:

Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/itchiodl-9TtSrW0h-py3.8/bin/itch-download", line 6, in <module>
    sys.exit(main())
  File "/app/itchiodl/downloader/__main__.py", line 67, in main
    lib.load_game(matches.group(1), matches.group(2))
  File "/app/itchiodl/library.py", line 56, in load_game
    self.games.append(Game(k))
  File "/app/itchiodl/game.py", line 22, in __init__
    self.data = data["game"]
KeyError: 'game'

In commit c652516 a check was added to determine if a game was not purchased. This was accomplished via the uploads/ endpoint. Unfortunately that endpoint replaced the call to the game data endpoint that we need to download the game. This adds the game data endpoint call back in.

In commit c652516 a check was added to
determine if a game was not purchased via the `uploads/` endpoint.
Unfortunately that endpoint replaced the call to the game data endpoint
that we need to download the game. This adds the game data endpoint call
back in.
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.

1 participant