Skip to content

Feat/danmaku - #9

Merged
power721 merged 62 commits into
masterfrom
feat/danmaku
Aug 6, 2026
Merged

power721 merged 62 commits into
masterfrom
feat/danmaku

Conversation

@power721

@power721 power721 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

power721 and others added 30 commits July 25, 2026 10:55
- tencent: prefer the URL episode vid over the HTML-embedded promo vid. Every
  episode page embeds the same promo vid (s00242sxrne), so scraping HTML first
  made every episode resolve to that promo -> unrelated danmaku. Mirrors
  danmu_api's URL-based extractVid.
- tencent: don't short-circuit episode expansion on a different same-named
  show's episode (a short-drama's ep13 was blocking the real drama's expansion,
  so 《百花杀》ep13 was never found).
- matching: accept subtitle-named episodes ("第N集 <plot>") via the new
  episode_matches_request helper and a leading-episode-marker guard in
  should_filter_name, while still rejecting different shows sharing the
  episode number.
- build_xml/parser: strip and tolerate XML-illegal control chars so a single
  \x08 in 126k danmaku no longer makes the whole payload unparseable (was
  surfacing as "弹幕加载失败: 弹幕为空").

Co-Authored-By: Claude <noreply@anthropic.com>
When multiple same-named titles share an episode number, prefer the candidate
whose Tencent cover id matches the user's playing URL (reg_src), so selection
no longer relies on MbSearch ordering luck (the 百花杀 case worked only because
the right show happened to rank first). Idea from danmu_api's cover-based routing.

Co-Authored-By: Claude <noreply@anthropic.com>
When builtin providers return no candidates, fall back to Douban meta-source
discovery: search subject -> fetch vendors (qq/iqiyi/youku/bilibili/migu media
ids) -> route to the matching provider's episode expansion. Reuses existing
provider resolve/cache; adds TencentDanmakuProvider.expand_page_url and wires
DoubanDiscovery into the default service.
…n miss

When builtin providers and douban discovery both miss and reg_src is a real
play-page URL, fall back to a third-party danmaku service (dmku.hls.one) via
OtherDanmakuProvider. Not in provider_order; only resolves when explicitly
selected, so it never pollutes normal search/ranking.
…>scroll)

Port single-source cleaning from danmu_api's danmu-util (blocked-word filter,
N-minute window dedupe, top/bottom->scroll) as pure DanmakuRecord transforms in
processing.py, wired into resolve_danmu before build_xml. Config via env vars
(ATV_DANMU_BLOCKED_WORDS / ATV_DANMU_GROUP_MINUTE / ATV_DANMU_CONVERT_TOP_BOTTOM);
UI settings entry is a follow-up.
Port danmu_api's offset-util: parse 'anime:sec' / 'anime/S01/E03@source:sec' /
'anime%:sec' rules from ATV_DANMU_OFFSET, resolve by anime/season/episode/source
specificity, and apply (shift or percent-scale) to records in resolve_danmu.
Controller passes danmaku_search_title + provider as offset_context.
power721 and others added 28 commits July 26, 2026 15:14
芒果TV下线了 /msite/search/v2(返回403),导致永远搜不到剧、
兜底到咪咕又解密失败。改用安卓端 /aphone/search/rebirth/v2,
解析 mediaRebirthV2 块并以 clipId 作为合集ID;错误信息附带真实
HTTP状态码,不再用 "invalid payload" 掩盖403。

Co-Authored-By: Claude <noreply@anthropic.com>
咪咕改了 gateway-crypto 加密(自定义加密,非 AES/ChaCha),现有硬编码
解密已失效。暂不接入 WASM 解密,仅做容错:resolve() 先探一个分段,
解密失败立刻抛出"加密接口已变更,暂无法解密",不再把全部分段都拉一遍
(实测从 ~40s 降到 0.25s)。网络错误仍走原"分段解析失败"聚合路径。

Co-Authored-By: Claude <noreply@anthropic.com>
咪咕弹幕加密接口已变更、暂不修复(见 36243d9),下线该弹幕源:
删除 providers/migu.py 及其在 service / 豆瓣发现 / 源偏好 / 搜索下拉 /
测试中的全部接线。咪咕元数据源与直播源不受影响。

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@power721
power721 merged commit f679853 into master Aug 6, 2026
4 checks passed
@power721
power721 deleted the feat/danmaku branch August 6, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant