mirror of
https://github.com/Emersont1/itchio.git
synced 2026-03-11 08:54:39 +00:00
Fix broken --download-game parameter
In commit c652516eec 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.
This commit is contained in:
parent
7cec2f24a2
commit
16db30f496
1 changed files with 7 additions and 2 deletions
|
|
@ -49,11 +49,16 @@ class Library:
|
|||
j = json.loads(rsp.text)
|
||||
game_id = j["id"]
|
||||
gsp = requests.get(
|
||||
f"https://api.itch.io/games/{game_id}/uploads",
|
||||
f"https://api.itch.io/games/{game_id}",
|
||||
headers={"Authorization": self.login},
|
||||
)
|
||||
k = gsp.json()
|
||||
if k != {"uploads": {}}:
|
||||
usp = requests.get(
|
||||
f"https://api.itch.io/games/{game_id}/uploads",
|
||||
headers={"Authorization": self.login},
|
||||
)
|
||||
l = usp.json()
|
||||
if l != {"uploads": {}}:
|
||||
self.games.append(Game(k))
|
||||
return
|
||||
print(f"{title} is a purchased game.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue