Skip to content

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

Open
triple-j wants to merge 1 commit intoEmersont1:mainfrom
triple-j:fix-download-game
Open

Fix issue where --download-game throws an error when downloading free games#82
triple-j wants to merge 1 commit intoEmersont1:mainfrom
triple-j:fix-download-game

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