Repository navigation
Conversation
用户反馈:一次添加两个账号,两个账号显示同一个练度(都是 token 加的)。 根因在向导的收尾逻辑:token 同步完成后,前端会给 added 里的**每一个**新账号 调一次 /api/account/import-maa。而 OperBoxData.json 每个 MAA 目录只有一份, 就是当时登录在 MAA 里的那个号——批量加号时等于把同一个号的练度逐个写进每个 账号。operbox.import_into() 是覆盖式的(chars/stats/missing/sync 全换), account 段保留,所以昵称各不相同、练度完全一样。 用自己的号加看不出来(MAA 识别的本来就是自己),加别人的号才露馅;本机没有 OperBoxData.json 的机器上那段代码根本不执行,所以不好复现。 - operbox.import_into(file, maa_dir, force=False):命中 _token_synced() (sync.source 是森空岛接口,或文件里存着 token)且没 force 时直接返回 skippedBy=token + 一句人话原因,不动任何数据。识别结果本就是降级数据 (没有技能/专精/模组),不该顶掉真数据 - api /api/account/import-maa 透传 force:只有账号页手动导入(弹窗里用户点过 确认)才带 force=true - 向导:只在「只加了一个号、且它同步后没有练度」时用识别结果兜底;多账号时 写一行日志说明为什么跳过,不再静默覆盖;账号页的手动导入弹窗补一句「会覆盖 当前练度(包括森空岛同步来的)」 - 冒烟 B14 补断言:token 同步的账号不 force 必须被拦下且不动练度、只存了 token 的老账号同样受保护、force=true 照旧覆盖 Co-authored-by: HuiParu <171644868+HuiParu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
发版 v2.5.4,修一个会写坏账号练度的问题。
包含:
_internal被占用要能说出是谁如果你是「一次添加多个账号后练度一模一样」的受害者:升级后点一次「同步全部账号」,会用森空岛数据把练度覆盖回来。
CI 会按 PR 标题打 tag、冒烟、打包 zip 并发布 Release。