Commit Graph

7 Commits

Author SHA1 Message Date
starmen1265 c8cdcb4631 fix(bilibili): correct metadata and filename in archive
PR Test / lint (pull_request) Successful in 1s
- Add _normalize_metadata() to flatten nested metadata structure
- Fix generate_frontmatter() to use correct metadata fields
- Change _sanitize_filename() to return standardized "bilibili_{bvid}" format

Fixes: analysis.md frontmatter showing "未命名"/0/"未知" instead of actual values
Fixes: audio filename using video title instead of platform_bvid format

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 13:48:28 +08:00
starmen1265 0b215dabe7 feat(download): add video download capability for videos without official subtitles
- Add download_video() to BilibiliAdapter using yt-dlp
- Add bilibili_cookie config to Settings
- Update DownloadProcessor to call video download for bilibili videos
- Add idempotency check to ASRProcessor for existing subtitle files
- Fix indentation error in asr.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 00:09:16 +08:00
starmen1265 368e946cd1 fix(bilibili): avoid nested asyncio.run() in async context
BilibiliAdapter._fetch_metadata_with_retry() now calls the underlying
async methods directly instead of sync wrappers that use asyncio.run().
This prevents "asyncio.run() cannot be called from a running event loop"
error when the adapter is called from within an already-running event loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 18:17:03 +08:00
starmen1265 c4beb3ef3c feat(02-03): implement ZhihuAdapter for answer and zhuanlan content
- Implement ZhihuAdapter class inheriting PlatformAdapter
- Support answer URL content extraction
- Support zhuanlan (article) URL content extraction
- Add cookie-based authentication from KBSettings
- Detect login page redirects (expired cookies)
- Return AuthError for missing/expired cookies
- Format content with YAML frontmatter
- Update package exports to include ZhihuAdapter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 18:24:55 +08:00
starmen1265 a6f4d34625 test(02-03): add failing tests for ZhihuAdapter
- Test answer content extraction
- Test zhuanlan (article) content extraction
- Test cookie-based authentication
- Test login page detection
- Test AuthError handling for missing/expired cookies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 18:24:37 +08:00
starmen1265 b74f6a0c73 feat(02-02): implement BilibiliAdapter for video and article metadata
- Implement PlatformAdapter interface for Bilibili platform
- Add video metadata extraction (BV号)
- Add article metadata extraction (CV号)
- Add automatic retry on network errors (3 attempts)
- Add state recording for failed steps
- Add content type identification from URL
- Add output filename generation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 18:23:11 +08:00
starmen1265 3f42bfaf0d test(02-02): add failing tests for PlatformAdapter base class
- Add test for abstract class instantiation prevention
- Add test for incomplete implementation detection
- Add test for complete implementation instantiation
- Add test for async method signatures
- Add shared fixtures for platform tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 18:19:24 +08:00