文件历史

42 次代码提交

作者 SHA1 备注 提交日期
caorushizi 2406b5b617 chore(electron,server): remove verbose startup logs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:19:14 +08:00
caorushizi c7dd925a34 feat(core): add yt-dlp plugin and consolidate binary paths into --deps-dir
- Add youtube download type with yt-dlp schema (CLI args, progress regex)
- Replace 6 individual --xxx-bin flags with single --deps-dir flag
- Add BinaryNames map in Go core to auto-resolve binary paths from deps dir
- Simplify Electron/Server binary resolvers to return depsDir only
- Add yt-dlp to deps-versions.json (v2026.03.17)
- Add YouTube option to UI download form with URL auto-detection
- Fix download-terminal.tsx writing [object Object] instead of log content
- Improve error messages when binary not found (include path and type)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:19:14 +08:00
caorushizi 25d149e9ef feat(core): integrate mediago-core as new download type
Add mediago-core (caorushizi/mediago-core) as a fourth download type
alongside m3u8, bilibili, and direct. This enables HLS/DASH streaming
downloads using the custom Go-based downloader.

Changes span the full integration path: dependency download config,
Go Core backend (type, schema, CLI flag, binary map), binary resolution
for Electron/Server, shared TypeScript types, i18n labels, UI dropdown,
dev scripts, and Dockerfile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:19:14 +08:00
caorushizi 5079180a31 refactor(server): use APP_NAME from env for data root directory
Load dotenv-flow to read APP_NAME, use it to derive the server data
root directory (~/.${APP_NAME}-server/) instead of hardcoding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 00:46:44 +08:00
caorushizi b291e30b13 docs(docker,server): unify data paths under single root directory
Consolidate all persistent paths under one mountable root:
- Docker: /app/mediago/{data,logs,downloads} with single VOLUME
- Server dev: ~/.mediago-server/{data,logs,downloads}
- DB renamed from app.db to data/mediago.db for consistency
- Update docker run command in README and docs (zh/en/jp)
- Add disclaimer to README

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 00:40:11 +08:00
caorushizi 452bbc3b7d refactor: merge player Go backend into core
Merge the standalone mediago-player binary into mediago-core. The core
now serves the player UI at /player/ via go:embed, and provides video
listing/streaming endpoints. Video root reuses the existing download
directory (local-dir) so no separate flag is needed.

Changes:
- Add internal/video package to core (handler, service, types)
- Embed player-ui assets via //go:embed in assets/embed.go
- Add SPA handler for /player/ path
- Register /api/v1/videos and /videos/* routes in core router
- core:build now builds player-ui before Go compilation
- Remove apps/player/ entirely (Go app, scripts, configs)
- Remove VideoServer from Electron, derive playerUrl from coreUrl
- Remove player binary management from server app
- Update CI workflow to remove player go.sum cache path

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 21:05:42 +08:00
caorushizi 9156cf9cd9 fix: gate UI behind Go adapter init and auto-build core/player
- Add adapterReady state to App.tsx: show Loading until initGoAdapter
  completes, preventing API calls before goHandle is set (fixes
  "No handler registered" errors for get-favorites, get-app-store, etc.)
- Add error handling and debug logging for player server startup
- Prepend core:build && player:build to dev:electron, dev:server,
  pack:electron, and release:electron scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 00:52:38 +08:00
caorushizi 38fa71b44b fix: config persistence, download-now auto-start, and player integration
1. Sync Go Core config to Zustand on app startup so settings persist
   across restarts (Go Core is the single source of truth).

2. Go Core Create handler now respects startDownload param — downloads
   start immediately when "Download Now" is clicked.

3. Player integration fixes:
   - Electron: graceful skip when player binary is not built
   - Server: start player service alongside Go Core, expose playerUrl
   - Web adapter: derive playerUrl from current host instead of empty string

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 00:27:30 +08:00
caorushizi a0c10de673 fix: update server binaryResolver and remove npm binary deps
- Update apps/server/src/binaryResolver.ts to use monorepo paths
  instead of npm platform packages
- Remove @mediago/core and @mediago/deps from server package.json
- Add .gitkeep placeholder in apps/player/assets/ui/ for go:embed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 21:20:36 +08:00
caorushizi a611919bcb refactor: remove shared-browser, shared-node, config packages
- shared-browser: inline createBrowserI18n into apps/ui/src/i18n/
- shared-node: move code into apps/electron by function:
  - i18n → core/i18n.ts
  - handle decorator → core/decorators.ts
  - registerControllerHandlers → core/registerControllerHandlers.ts
  - TYPES → types/symbols.ts
  - binaryResolver → utils/binaryResolver.ts
  - DownloaderServer/VideoServer → services/
  - copy binaryResolver to apps/server for resolveCoreBinaries
- config: move tsconfig.{base,app,node}.json to monorepo root

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 19:47:51 +08:00
caorushizi 8e8e71bd6b feat: replace Node.js server with Go Core direct connection
- Remove old Koa/Socket.IO server, replace with minimal ServiceRunner launcher
- UI now connects directly to Go Core via SDK (HTTP + SSE), no middleware
- Add GoEventBridge for SSE events and progress polling
- Add Dockerfile and docker-compose for single-container deployment
- Fix web mode adapter Proxy ownKeys for proper method enumeration
- Fix auth flow: setupAuth now sets apiKey, App.tsx passes stored apiKey
- Add error handling in download-form for getVideoFolders
- Remove conversion.controller import (file was deleted)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 17:30:44 +08:00
caorushizi 1a58a05ce4 fix: forward download failed/stopped events to UI for immediate status updates
Failed and stopped events were only logged but never sent to the UI,
causing tasks to stay stuck showing "downloading" status. Now all terminal
state changes (success/failed/stopped) are forwarded via IPC/Socket.io
and trigger SWR revalidation for immediate UI refresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:55:23 +08:00
caorushizi 8c70945a40 feat: migrate controllers to Go backend API, remove TypeORM/dao/services layer
Remove the entire TypeORM-based data layer (entities, repositories, services)
and refactor Electron/Server controllers to delegate to Go backend via HTTP API.
Add go-adapter for UI to communicate directly with Go core service.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:33:11 +08:00
caorushizi 515bbe9b8e feat: migrate config to Go backend as single source of truth
Electron:
- Add GoConfigCache for synchronous config reads, seeded from Go API
- Replace all ElectronStore AppStore reads with GoConfigCache
- SSE config-changed events drive platform side effects + IPC to UI
- Slim ElectronStore to window bounds only, with old config.json migration
- Fix useProxy handler passing boolean instead of proxy address
- Add missing audioMuted/enableMobilePlayer SSE handlers

Server:
- Add ServerConfigCache to eliminate per-request getConfig() HTTP calls
- Migrate auth middleware and controllers to use config cache
- Remove StoreService and conf dependency entirely

UI:
- Replace "store-change" full-dump IPC with incremental "config-changed"

Shared:
- Remove appStoreDefaults (no longer needed)
- Fix DownloadStatus.Watting → Pending typo
- Fix VideoServer.enableMobilePlayer inverted logic
- Simplify DownloadServiceOptions (Go reads its own config)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 14:28:50 +08:00
caorushizi e33d695ca9 feat: 添加 sentry 2025-11-18 18:31:46 +08:00
caorushizi 0ff360e7d6 fix: download progress
fixes: #577
2025-11-18 12:16:00 +08:00
caorushizi 9e9748c6f8 fix: docker 无法播放视频 2025-11-03 18:18:47 +08:00
caorushizi 45f740c36f fix: docker build 2025-11-03 16:31:22 +08:00
caorushizi 993c8f73ed fix: docker build 2025-11-03 16:02:07 +08:00
caorushizi 53d59c3ab9 feat: 修复登录时的问题 2025-11-03 03:50:35 +08:00
caorushizi e174aeef6a fix: 登录的一些问题 2025-11-03 03:50:35 +08:00
caorushizi f490539ee2 feat: 完善登录逻辑 2025-11-03 03:50:35 +08:00
caorushizi 74b3826319 refactor: 优化目录结构 2025-11-03 03:50:35 +08:00
caorushizi 910d1c30a6 feat: 添加登录页面 2025-11-03 03:50:35 +08:00
caorushizi 52e40fed54 fix: server build 2025-11-01 16:23:35 +08:00
caorushizi 6189ca7f9a feat: 优化图标 2025-11-01 01:55:42 +08:00
caorushizi 7423e5cfca feat: 优化 ts 类型 2025-11-01 01:55:42 +08:00
caorushizi efae7de938 fix: 修复了一些问题 2025-11-01 01:55:42 +08:00
caorushizi 1ea3c02471 fix: mediago server log 2025-11-01 01:55:42 +08:00
caorushizi cece6ee89b fix: something 2025-11-01 01:55:42 +08:00
caorushizi 9e0752cafc chore(repo): convert text files to CRLF line endings 2025-11-01 01:55:42 +08:00
caorushizi f92f1affc6 feat(download-log): fetch logs lazily in dialog
- replace terminal drawer with modal dialog and load logs via SWR

- resolve ffmpeg binary path using deps module across runtimes

- flatten shared i18n resources and bump core packages
2025-11-01 01:55:42 +08:00
caorushizi 9e0869b675 feat: update server 2025-10-28 01:18:57 +08:00
caorushizi b09b0a300e feat: build release 2025-10-28 00:35:31 +08:00
caorushizi 77b08f33c2 feat: use @mediago/core 2025-10-28 00:35:31 +08:00
caorushizi fa7a175260 fix: video not exist & download dropdown item 2025-10-25 00:16:46 +08:00
曹儒士子 cad18fafc0 refactor(ui): rename download item task variable 2025-10-16 14:58:02 +08:00
caorushizi 43160bf5e7 feat: modify database 2025-10-16 02:39:47 +08:00
caorushizi d97131d081 feat: add native bin 2025-10-16 00:51:56 +08:00
caorushizi 4cf87b7811 feat: ui 2025-10-16 00:51:56 +08:00
caorushizi 463664f7ec feat: use video and downloader server 2025-10-14 18:56:10 +08:00
caorushizi 0867e2da0f refactor: reponame 2025-10-08 14:30:53 +08:00