19 Commits

Author SHA1 Message Date
周小舟
ea8245462d release: v1.1.0 — first genuinely working desktop release
- Bump version 1.0.0 → 1.1.0 (tauri.conf.json, Cargo.toml, Cargo.lock); the
  build script now derives the DMG name from tauri.conf.json so it won't drift.
- RELEASE_NOTES.md + CHANGELOG.md: document v1.1.0 (zero-dependency desktop
  install, end-to-end clip pipeline, black-screen / stuck-list / retry-spam /
  stuck-pipeline fixes, opt-in faster-whisper, Gemini→google-genai, CI unify +
  repo cleanup).
- Drop two stale doc links to files removed in the cleanup
  (QUICK_START_GUIDE, SYSTEM_REBUILD_GUIDE).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 13:01:06 +08:00
周小舟
6e59f40f01 feat: in-app Whisper (faster-whisper) — opt-in install + model management
Videos without embedded subtitles (e.g. B站 without AI字幕) need Whisper to
generate subtitles, but bundling it would bloat every install. Instead let
users install it on demand from Settings → 语音识别, and pick which model.

Backend uses faster-whisper (CTranslate2, no PyTorch, ~214MB installed, several
times faster than openai-whisper, cross-platform) — chosen over mlx-whisper,
which hard-depends on torch (~2-3GB).

- whisper_runtime.py (new): pip-install faster-whisper into a user-writable dir
  (<data>/whisper-runtime) using the bundled Python; add to sys.path; status +
  coarse progress; uninstall. Never writes into the signed .app bundle.
- whisper_model_manager.py: tiny→large-v3 from Systran/faster-whisper-*,
  background download via huggingface_hub, real status; cache under
  <data>/whisper-models.
- speech_recognizer.py: subtitle generation rewritten from the `whisper` CLI to
  faster-whisper's WhisperModel API → SRT; availability = runtime installed.
- speech_recognition.py API: /whisper/install, /whisper/uninstall,
  /whisper/runtime-status (+ existing /whisper-models*).
- SpeechRecognitionConfig.tsx: was a stub; now a full UI (install button +
  progress + log, model list with download/delete/status) wired to a new
  speechApi in services/api.ts.
- build_macos_arm.sh: allowlist faster_whisper/ctranslate2/huggingface_hub in
  the dependency guard (they're installed at runtime, imported lazily).

Verified end-to-end: install runtime → download tiny model → transcribe a real
video into a valid SRT, all through the API/runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 01:06:26 +08:00
周小舟
ba3df7e60b chore: remove dead PyInstaller-route scripts; rewrite build docs
After the CI unification, the PyInstaller / prepare_resources route scripts
were fully orphaned (referenced only by each other and stale docs). Remove the
cluster:

  build_backend.py, prepare_resources.py, check_bundle_size.py, smoke_api.py,
  build_desktop.py, dev_desktop.py, test_desktop.py, quick_build_check.sh,
  build_release.py

scripts/ now holds only what's live: build_macos_arm.sh (the one packaging
route), verify_desktop.sh (backend smoke), monitor_whisper.py (runtime).

Rewrite scripts/README.md and BUILD_GUIDE.md to describe the single PBS route
accurately (they previously documented the dead PyInstaller flow), and fix the
stale build command in RELEASE_CHECKLIST.md.

Also removed a 94M stale _autoclip-backend-pyinstaller-bak left in
src-tauri/resources/ (untracked build junk).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:30:27 +08:00
周小舟
f657a4ba2f fix: bundle missing runtime deps (pytz + LLM SDKs); guard against drift
The installed app opened but the project list was stuck forever on
"正在加载项目列表...". Root cause: GET /api/v1/projects/ returned HTTP 500
with `ModuleNotFoundError: No module named 'pytz'`. The portable build only
installs requirements.txt, but the backend imported packages the dev venv had
that were never listed there.

A static scan of backend imports against the portable runtime found 4 missing:
  - pytz                  (broke the project list — hot path)
  - openai                } LLM provider SDKs — the AI clipping pipeline. These
  - google-generativeai   } lived only in install_llm_dependencies.py, so the
  - dashscope             } bundle shipped without them and any provider failed.

Add all 4 to requirements.txt. Verified the rebuilt app returns 200 for
/api/v1/projects/ on a clean PATH.

Also add a build-time dependency-completeness check to build_macos_arm.sh:
after installing deps + copying the backend, it AST-scans every third-party
import and fails the build if any can't be resolved in the portable runtime.
This turns "works in dev, 500s in the bundle" into a hard build error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 17:23:11 +08:00
周小舟
73fa9b3257 fix: bundle self-contained ffmpeg+ffprobe and wire backend to use them
The desktop build started the backend fine on the build machine but would
fail on any clean Mac: video processing needs ffmpeg/ffprobe and neither was
usable for distribution.

Three compounding bugs, all fixed:

1. backend_manager.rs never set AUTOCLIP_FFMPEG_PATH, so the backend fell
   back to `shutil.which("ffmpeg")` — i.e. the build machine's homebrew
   ffmpeg. Now the launcher exports AUTOCLIP_FFMPEG_PATH / AUTOCLIP_FFPROBE_PATH
   pointing at the bundled binaries (resources/ffmpeg/{ffmpeg,ffprobe}).

2. The build bundled only ffmpeg, not ffprobe (the backend needs both).

3. The bundled ffmpeg was homebrew's dynamic build (412KB, 57 /opt/homebrew
   dylib deps) — dead on any machine without homebrew. The build now downloads
   the STATIC arm64 ffmpeg+ffprobe (48MB each, zero non-system deps) from
   osxexperts.net, cached under build/ffmpeg-cache, with a build-time assert
   that fails if any homebrew dep reappears.

Also exclude stray *.rdb from the bundled backend source.

Verified end-to-end: full build → App+DMG; app launches with /opt/homebrew
stripped from PATH (clean-machine sim), backend starts, HTTP server responds;
bundled ffmpeg/ffprobe run under an empty environment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 13:45:57 +08:00
周小舟
5298b057f0 chore: prune dead build scripts; land working PBS desktop build
Cleanup + lock in the python-build-standalone (PBS) desktop build that
actually produced a working macOS arm64 DMG.

- Remove 20 zero-reference legacy build/test/verify scripts (dead
  PyInstaller-era experiments, none referenced by CI, docs, or live scripts)
- backend_manager.rs: add PBS python runtime lookup (resources/python/bin/python3)
- tauri.conf.json: devUrl→:3000, clear beforeBuildCommand, resources=[]
  (resources injected post-build to dodge macOS extended-attr Permission denied)
- build_macos_arm.sh: rewritten as the canonical PBS build route
- .gitignore: also ignore src-tauri/resources/python/ (338M runtime, build output)
- Drop stale .venv_deps_installed marker; add HANDOFF.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 13:36:39 +08:00
周小舟
b50a29c025 feat: fix macOS desktop build for v1.0.0 release
- Remove backend binary platform suffix (keep as autoclip-backend)
- Fix FFmpeg path (ffmpeg-unified -> ffmpeg to match tauri.conf.json)
- Remove non-existent data/ from PyInstaller spec
- Make venv optional in build script (support CI and bare environments)
- Empty beforeBuildCommand (build_macos_arm.sh handles everything)
- Simplify tauri.conf.json resources to ffmpeg + autoclip-backend

Build verified:
- App bundle: 54MB (12MB Tauri + 41MB backend + 412KB ffmpeg)
- DMG: 50MB
- All resources correctly bundled in Contents/Resources/resources/

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 16:40:52 +08:00
Kris K
593cc62bd5 fix: desktop client, CI fixes, and backend (#61)
Squashed merge of fix/problem-fixes-from-main.

- Desktop client (Tauri v2) wiring + packaging
- CI workflow updates (Python 3.11, Rust toolchain, Tauri CLI, WebKit deps)
- Backend test fix (test_missing_api_key respects CI-injected env var)
- build_backend.py: support CI without venv + Windows-safe ASCII output

Desktop build workflows (Linux/Windows/macOS) still failing — tracked in #65.
2026-05-28 15:48:49 +08:00
Kris Ka
28803c776d feat: 添加视频标题编辑功能和Docker支持
- 新增视频标题编辑功能
- 添加Docker容器化支持
- 完善国际化文档
- 更新README和贡献指南
- 优化集合和项目管理功能
2025-09-16 01:33:45 +08:00
Kris Ka
15d1e94fe3 修复YouTube下载任务和项目删除功能
- 修复YouTube下载任务中asyncio导入缺失问题
- 修复项目删除功能中Task模型导入缺失和事务冲突问题
- 更新.gitignore文件,排除测试数据和媒体文件
- 添加数据库优化和清理相关脚本
- 完善项目删除功能,支持完整清理项目数据、文件和进度缓存
2025-09-15 15:00:55 +08:00
Kris Ka
acbdc1f29b 完成项目问题修复和优化
主要改进:
1. 清理重复文件和冗余代码
   - 删除重复的API文件 (upload_backup.py, upload_new.py等)
   - 删除旧版本的B站服务文件 (bilibili_upload_v2.py到v6.py)
   - 统一B站服务接口

2. 优化数据存储架构
   - 创建OptimizedStorageService解决双重存储问题
   - 数据库只存储元数据,文件系统存储实际文件
   - 提供数据迁移脚本和一致性检查工具

3. 统一错误处理机制
   - 创建统一错误处理中间件
   - 提供错误处理装饰器和上下文管理器
   - 统一错误响应格式

4. 完善配置管理
   - 创建UnifiedConfig统一配置系统
   - 整合所有配置源(环境变量、配置文件、默认值)
   - 提供配置迁移脚本

5. 增强进度系统
   - 创建EnhancedProgressService
   - 支持Redis缓存、数据库持久化和内存缓存
   - 提供完整的进度跟踪和状态管理

新增文件:
- backend/services/optimized_storage_service.py
- backend/core/error_middleware.py
- backend/core/unified_config.py
- backend/services/enhanced_progress_service.py
- scripts/migrate_to_optimized_storage.py
- scripts/check_data_consistency.py
- scripts/migrate_config.py
- docs/ERROR_HANDLING_GUIDE.md
- docs/PROGRESS_SYSTEM_GUIDE.md

修复文件:
- backend/services/bilibili_service.py (统一上传接口)
- backend/main.py (使用新的错误处理中间件)
2025-09-15 12:07:09 +08:00
Kris Ka
6ba5caac3d 保存当前工作状态 - 准备进行项目review 2025-09-15 11:02:14 +08:00
Kris Ka
92c2e8ede7 修复WebSocket进度更新和前端状态自动更新问题
- 修复WebSocketNotificationService.send_processing_progress方法参数不匹配问题
- 修复前端RealTimeStatus组件WebSocket消息处理逻辑
- 修复Celery Worker队列配置,确保任务正确路由到processing队列
- 修复Celery应用导入冲突,统一使用正确的celery_app配置
- 添加实时项目状态更新功能,前端无需手动刷新即可看到处理进度
- 完善系统启动脚本,修复PYTHONPATH未绑定变量错误
- 优化流水线处理逻辑,确保所有6个步骤正常执行
- 添加完整的项目文档和启动指南

测试结果:
- WebSocket进度更新正常工作(16%, 33%, 100%)
- 流水线处理完全正常(6个步骤全部成功)
- 前端状态自动更新正常
- 项目状态正确同步到数据库
2025-09-08 17:21:31 +08:00
Kris Ka
ffaf91a1f8 fix: 修复Ant Design bodyStyle废弃警告和合集拖拽排序功能
- 将所有bodyStyle替换为styles.body,消除Ant Design废弃警告
- 修复合集拖拽排序功能,解决'Collection not found'错误
- 优化前端状态管理,确保currentProject和projects数组同步
- 添加调试脚本和文档,便于问题排查
- 修复数据库clip_ids映射问题,支持UUID和数字ID转换
2025-08-26 06:45:19 +08:00
Kris Ka
50e5f3de86 修复问题 2025-08-26 00:18:26 +08:00
Kris Ka
d22cc7e004 修复各种问题 2025-08-21 01:05:23 +08:00
Kris Ka
d634f133ba 修复数据库问题 2025-08-06 17:51:47 +08:00
Kris Ka
bf8043101f 整理文件 2025-08-06 12:01:36 +08:00
Kris Ka
bb2fe1a929 chore: clean repo and reinitialize 2025-08-03 01:55:46 +08:00