Skip to content

Commit

Permalink
Use ambr as icon base for gacha arts
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Nov 20, 2024
1 parent 1f24312 commit 28ce2e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions genshin/models/genshin/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

_LOGGER = logging.getLogger(__name__)

ICON_BASE = "https://enka.network/ui/"
ENKA_ICON_BASE = "https://enka.network/ui/"
AMBR_ICON_BASE = "https://gi.yatta.moe/assets/UI/"


def _parse_icon(icon: typing.Union[str, int]) -> str:
Expand Down Expand Up @@ -52,12 +53,12 @@ def _create_icon(icon: str, specifier: str) -> str:
return icon # no point in trying to parse invalid urls

icon_name = _parse_icon(icon)
return ICON_BASE + f"{specifier.format(icon_name)}.png"
return ENKA_ICON_BASE + f"{specifier.format(icon_name)}.png"


def _create_icon_from_id(character_id: int, specifier: str) -> str:
icon_name = _get_icon_name_from_id(character_id)
return ICON_BASE + f"{specifier.format(icon_name)}.png"
return AMBR_ICON_BASE + f"{specifier.format(icon_name)}.png"


def _get_db_char(
Expand Down

0 comments on commit 28ce2e9

Please sign in to comment.