Skip to content

Commit

Permalink
Use images during character data completion
Browse files Browse the repository at this point in the history
Closes #12
  • Loading branch information
thesadru committed Jan 10, 2022
1 parent 41d0023 commit 39f8d2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion genshin/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ def __autocomplete(cls, values: Dict[str, Any]) -> Dict[str, Any]:
"""Complete missing data"""
partial: bool = False

id, icon, name = values.get("id"), values.get("icon"), values.get("name")
id = values.get("id")
icon = values.get("icon") or values.get("image")
name = values.get("name")

if id and id in CHARACTER_NAMES:
char = CHARACTER_NAMES[id]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="genshin",
version="0.3.0",
version="0.3.1",
author="thesadru",
author_email="[email protected]",
description="An API wrapper for Genshin Impact.",
Expand Down

0 comments on commit 39f8d2d

Please sign in to comment.