Repository navigation
修复抖音依赖缺失与历史同步归属,新增径向性能菜单与首页平台跟随 - #2
Merged
Merged
Conversation
重建自 Codex 会话日志(原提交 ca08fd7 在 2026-10-05 的目录误删中丢失)。perf_chart.py +574/-62、tests/test_perf_chart.py 713 行 36 项测试。
requirements 增加 protobuf>=4.21,<7.0 与 protobuf3-to-dict(protobuf 7 移除了 FieldDescriptor.label,会让 protobuf3-to-dict 失败);两个 requirements 文件加 UTF-8 BOM 以免 pip 在 GBK 控制台解码失败;spec 补 hiddenimports;adapter 捕获 ImportError 后上报「依赖缺失」而不是误报 Cookie 过期。
init 接口会先后返回 1.7MB 真数据与 87 字节空壳,改为只保留更大的响应,且不足 1KB 时继续等待;L2 缓存解析出 0 会话时判定为坏缓存并删除后回退 L3;消息解析的会话串两种方向都认(实测 98/100 是 0:1:{我}:{对方}),归属覆盖率 2/265 → 151/265,正文长度上限 5000 → 256KB。
平台状态变化时,若当前平台没有会话则切到有会话的平台;ruler 增加 has_platform(),平台不存在时不切换,避免切换到空页。
|
@Possibility-He is attempting to deploy a commit to the Agying's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
概述
这个 PR 修掉抖音插件在真实环境下的几个阻塞问题(依赖缺失、历史同步被空壳响应覆盖、消息会话归属失效),并补上首页平台跟随与半透明径向性能菜单。所有改动都在本地实测过,附实测数据。
改动(4 个提交)
1.
feat: add translucent radial performance menu性能页的半透明径向菜单:
dmshoot/gui/widgets/perf_chart.py(+574/-62)与tests/test_perf_chart.py(713 行、36 项 Qt 测试)。2.
fix(douyin): 补齐 protobuf 依赖链并区分「依赖缺失」与「Cookie 过期」requirements.txt增加protobuf>=4.21,<7.0与protobuf3-to-dict>=0.1.5:external/DouYin_Spider/dy_apis/douyin_api.py依赖protobuf_to_dict,缺失时插件直接导入失败;<7.0的原因:protobuf 7 移除了FieldDescriptor.label,protobuf3-to-dict 0.1.5会直接抛错(实测 4.21.6–6.33.6 正常,7.36.2 失败);UnicodeDecodeError;DMShoot.spec补hiddenimports(google.protobuf、protobuf_to_dict、six);ImportError后上报「依赖缺失」,不再误报成「Cookie 已过期」。3.
fix(douyin): 历史同步保留最大 payload 并修正会话归属get_message_by_init会先后返回 1,787,995 字节的真数据与 87 字节空壳响应;原实现后到的空壳会覆盖真数据,改为只保留更大的响应,且不足 1KB 时继续等待;0:1:{我的uid}:{对方uid},而原实现只认0:1:{对方uid}:{我的uid},导致只有 2 条能归属;修正后解析出的 163 条消息里 100 条归属正确、分布到 18 个会话(修复前全部挤在 1 个会话);4.
feat(ui): 首页自动跟随已连接平台并支持平台缺省平台状态变化时,若当前平台没有会话则自动切到有会话的平台;
ruler.has_platform()保证不会切到不存在的平台而出现空白页。验证
QT_QPA_PLATFORM=offscreen python -m unittest discover -s tests -p test_perf_chart.py→ Ran 36 tests … OKModuleNotFoundError: No module named 'protobuf_to_dict'(状态显示「依赖缺失」),修复后正常连接(状态: 骑着蜗牛闯世界、WS已连接 ✓)缓存命中 L2(Protobuf)→L2 昵称补全成功 → 20会话→✓ 同步完成: 20会话 + 38条历史消息<7.0)备注
douyin_enabled等)决定。