Feat/danmaku - #9
Merged
Merged
Conversation
- 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.
# Conflicts: # tests/test_storage.py
芒果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>
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.
No description provided.