Skip to content

Commit

Permalink
chore: change default asset url
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao authored Nov 20, 2024
1 parent 7b57d6f commit 4d9ff8f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions enkanetwork/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,24 @@

# Base URL
BASE_URL = "https://enka.network/{PATH}"
YATTA_URL = "https://gi.yatta.moe/assets/{PATH}"

# Request
CHUNK_SIZE = 5 * 2**20
RETRY_MAX = 10


def create_path(path: str) -> str:
return BASE_URL.format(PATH=path)
return YATTA_URL.format(PATH=path)


def create_ui_path(filename: str) -> str:
return create_path(f"ui/{filename}.png")
if "RelicIcon" in filename:
return create_path(f"UI/reliquary/{filename}.png")
elif "EquipIcon" in filename and filename.endswith("_Awaken"):
a = len("_Awaken")
return create_path(f"UI/{filename[:-a]}.png")
return create_path(f"UI/{filename}.png")


def validate_uid(uid: str) -> bool:
Expand Down

0 comments on commit 4d9ff8f

Please sign in to comment.