From 8334b437a0af0e933a0a2ea2dc7164b821ea1ddb Mon Sep 17 00:00:00 2001 From: hopeless <99332743+pwnless@users.noreply.github.com> Date: Mon, 18 Dec 2023 11:18:03 +0800 Subject: [PATCH] Fix Artifact setName None error --- enkapy/client.py | 3 +-- enkapy/model/artifact.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/enkapy/client.py b/enkapy/client.py index 28bc8b2..04be5ce 100644 --- a/enkapy/client.py +++ b/enkapy/client.py @@ -267,8 +267,7 @@ async def fetch_user(self, uid: int, player_only=False) -> EnkaData: for equip in character.equipList: equip.flat.nameText = await self.resolve_text_hash(equip.flat.nameTextMapHash, self.lang) if isinstance(equip, Artifact): - equip.flat.nameTextMapHash = await self.resolve_text_hash(equip.flat.setNameTextMapHash, - self.lang) + equip.flat.setNameText = await self.resolve_text_hash(equip.flat.setNameTextMapHash, self.lang) if character.id in self._avatar_data: character.name = await self.resolve_text_hash( self._avatar_data[character.id]['nameTextMapHash'], diff --git a/enkapy/model/artifact.py b/enkapy/model/artifact.py index 586107a..bd3e965 100644 --- a/enkapy/model/artifact.py +++ b/enkapy/model/artifact.py @@ -53,7 +53,7 @@ class ArtifactFlat(BaseModel): """Artifact sub stats""" setNameTextMapHash: str """Artifact name hash""" - nameTextMapHash: Optional[str] = Field('') + setNameText: Optional[str] = Field('') """Artifact set name text *Note: You must called load_lang before otherwise this field is empty*""" diff --git a/setup.py b/setup.py index e10f1ba..b837b0a 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="enka.py", - version="1.1.7", + version="1.1.8", author="pwnless", author_email="mystream@riseup.net", description="Library for fetching JSON data from site https://enka.network/",