🐛 Fix Avatar List Get name_card

This commit is contained in:
omg-xtao 2023-01-05 13:29:33 +08:00 committed by GitHub
parent d71958a9be
commit 3419088c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -9,8 +9,8 @@ from utils.const import AMBR_HOST, PROJECT_ROOT
from utils.log import logger
__all__ = ["update_metadata_from_ambr", "update_metadata_from_github", "make_github_fast"]
RESOURCE_REPO = "tamilpp25/Grasscutter_Resources"
RESOURCE_BRANCH = "3.2"
RESOURCE_REPO = "RTPaimon/Grasscutter_Resources"
RESOURCE_BRANCH = "3.3"
RESOURCE_ROOT = "Resources"
RESOURCE_DEFAULT_PATH = f"{RESOURCE_REPO}/{RESOURCE_BRANCH}/{RESOURCE_ROOT}/"

View File

@ -161,7 +161,7 @@ class AvatarListPlugin(Plugin, BasePlugin):
choices = ArkoWrapper(characters).sort(lambda x: x.friendship, reverse=True)
name_card_choices = ( # 找到与角色对应的满好感名片ID
ArkoWrapper(choices)
.map(lambda x: next(filter(lambda y: y["name"].split(".")[0] == x.name, NAMECARD_DATA.values()), None))
.map(lambda x: next(filter(lambda y: y["name"].split("·")[0] == x.name, NAMECARD_DATA.values()), None))
.filter(lambda x: x)
.map(lambda x: x["id"])
)