ShukeBta
7e83047fdb
chore: release MediaStationGo v0.0.31
2026-05-30 12:07:35 +08:00
soldosluka857
b9b7b7052a
feat(organize/scan): transfer modes, seeding-safe relocation, inode dedup, incremental scanning
...
- Organizer: add move/copy/hardlink/symlink transfer modes (default move),
per-request target_path/transfer_mode overrides, and honor organize.target_dir
/ organize.transfer_mode settings.
- keep_seeding (default on): escalate move->hardlink (cross-device->copy) so the
qBittorrent source stays in place and continues seeding after organize.
- qBittorrent SetLocation + POST /downloads/relocate to migrate whole torrents
while keeping them seeding.
- Scanner: FileID (device:inode) hardlink dedup to avoid duplicate recognition
and double-counted storage; extract single-file ingest.
- Watcher: recursive watch + incremental per-file ingest/remove instead of full
re-scan; periodic full library scan now gated behind scan.periodic_enabled
(default off) to reduce disk wear.
- Telegram bot: handle callback_query in polling, declare allowed_updates in
webhook, answer callbacks.
- Frontend: settings for transfer mode / keep_seeding / periodic scan; organize
panel target dir + transfer mode overrides.
- Tests for transfer modes, organizer resolution, SetLocation, inode dedup,
incremental ingest/remove.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-30 12:01:46 +08:00
soldosluka857
4e5797f1f4
fix: correct HTTP status codes and error handling in remaining handlers
...
- createPlaylistHandler: 200 → 201 Created, service errors → 500
- createSiteHandler: service/DB errors → 500 (was 400)
- saveStorageConfigHandler: service errors → 500 (was 400)
- SchedulerHandler.RunTask: task errors → 500 (was 400 with ErrInternal)
- aria2StatsHandler: service errors → 500 (was 400)
- organizeMediaHandler: service errors → 500 (was 400)
- testDownloadClientHandler: test failure → 200 with ok:false (was 400)
- testStorageConfigHandler: test failure → 200 with ok:false (was 400)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-30 10:52:28 +08:00
soldosluka857
260cc164a0
fix: additional HTTP status code and error handling corrections
...
- createBackupHandler: 200 → 201 Created
- addDownloadHandler: 200 → 201 Created, service errors → 500
- createAssistantSessionHandler: 200 → 201 Created
- writeUserMutationError: default error → 500 (was 400)
- resetUserPasswordHandler: service errors → 500, success → 204 NoContent
- createLibraryHandler: service errors → 500 (was 400)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-30 10:45:29 +08:00
soldosluka857
e97891175a
fix: security hardening and HTTP status code corrections
...
- importSTRMHandler: add URL scheme validation (blocks file://, ftp://, etc.)
- backup Delete/Restore: harden path traversal check (block backslash, require .db extension)
- HTTP 201 for create endpoints: register, subscription, download client, notify channel, library, STRM import
- Error handling: return 500 for service/infra errors in download client and notify channel handlers
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-30 10:44:47 +08:00
soldosluka857
0572612833
fix: add field whitelist to site update, fix HTTP status codes in site handlers
...
- SiteService.Update: whitelist updatable fields to prevent injection of
id, created_at, deleted_at, login_status, upload_bytes, download_bytes
- createSiteHandler: return 201 Created (was 200 OK)
- siteSearchHandler: return 500 for infra errors (was 400)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-30 10:31:54 +08:00
soldosluka857
2c45fa596a
fix: improve play profile input validation, error responses, and HTTP status codes
...
- createPlayProfileHandler: return 201 Created (not 200) on success
- create/update handlers: return 500 for infra errors, 400 only for
validation errors (using new ErrPlayProfileValidation sentinel)
- deletePlayProfileHandler: validate JSON body (was silently ignored)
- verifyPlayProfilePINHandler: validate JSON body (was silently ignored)
- verify handler catch-all: return 500 (not 400) for unexpected errors
- Service layer: wrap validation errors with ErrPlayProfileValidation
so handlers can distinguish client vs server errors
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-30 10:19:57 +08:00
soldosluka857
5bbc9fadfe
security: fix SSRF, restrict CORS, add rate limiting on auth endpoints
...
- Add isPrivateHost() to block image proxy requests to loopback/private/
link-local IPs (SSRF mitigation)
- Add isAllowedLocalPath() to restrict local file reads to configured
data/cache/media directories only
- CORS middleware now takes debug flag; wildcard only when debug=true,
production omits headers (same-origin enforced)
- Add per-IP sliding-window rate limiter (10 req/min) on login/register
and Emby AuthenticateByName endpoints
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-30 10:03:43 +08:00
ShukeBta
d35086f49d
fix: hide adult libraries across dashboard views
2026-05-30 03:50:52 +08:00
ShukeBta
e8c2cf1ea4
fix: require password only for adult visibility changes
2026-05-30 03:45:01 +08:00
ShukeBta
ce9abf6306
fix: repair user password reset and recreate flow
2026-05-30 03:33:36 +08:00
ShukeBta
99ecae0c44
fix: add global adult library visibility controls
2026-05-30 03:24:08 +08:00
ShukeBta
ce8ffabba7
fix: ignore non-command telegram group messages
2026-05-30 03:04:30 +08:00
ShukeBta
f8ef35c8e1
fix: stabilize telegram bot proxy and legacy permissions
2026-05-30 02:54:25 +08:00
ShukeBta
67ba1bdcce
fix: clarify telegram member binding permissions
2026-05-30 02:19:22 +08:00
ShukeBta
3c946559f5
fix: simplify telegram channel access rules
2026-05-30 02:16:18 +08:00
ShukeBta
7e01c42857
fix: improve telegram channel connectivity
2026-05-30 02:07:09 +08:00
ShukeBta
be6b8bf27f
fix: tighten telegram channel binding
2026-05-30 01:54:26 +08:00
ShukeBta
b5e11b6938
fix: secure adult visibility and telegram bot access
2026-05-30 01:39:11 +08:00
ShukeBta
db65e54c45
fix: avoid duplicate subscription downloads
2026-05-29 17:39:57 +08:00
ShukeBta
99fe7329f7
fix: isolate play profiles per user
2026-05-29 15:56:51 +08:00
ShukeBta
633a8cf715
fix: enforce adult profile pin visibility
2026-05-29 15:16:20 +08:00
ShukeBta
a8395c9de7
fix: enforce transcoding resource controls
2026-05-29 13:54:19 +08:00
ShukeBta
27df93fa3d
feat: add licensing and access controls
2026-05-29 12:47:54 +08:00
ShukeBta
00b9c1bb79
fix: refresh library artwork previews
2026-05-29 10:13:34 +08:00
ShukeBta
dfe2b3f017
fix: prioritize local poster artwork
2026-05-29 09:52:16 +08:00
ShukeBta
b7ea68a67c
fix: make qbittorrent login compatible
2026-05-29 04:15:44 +08:00
ShukeBta
2d90d9cba5
fix: improve qbittorrent host connectivity
2026-05-29 03:35:14 +08:00
ShukeBta
48d33275cb
fix: keep existing library files in place
2026-05-29 03:04:27 +08:00
ShukeBta
fc0dc70bad
fix: avoid repeated category organization
2026-05-29 02:55:46 +08:00
ShukeBta
3031893156
fix: map docker host library paths
2026-05-29 02:44:52 +08:00
ShukeBta
00b5418fb0
feat: align smart media classification paths
2026-05-29 02:08:38 +08:00
ShukeBta
c1b5dac784
feat: improve subscription and download cards
2026-05-28 23:27:34 +08:00
ShukeBta
05d49ca470
Add advanced discovery subscriptions
2026-05-28 22:21:48 +08:00
ShukeBta
a666245c44
Fix subscription search to queue full series
2026-05-28 20:10:19 +08:00
ShukeBta
b5f1f1954e
Update deployment docs and media library UI
2026-05-28 17:32:55 +08:00
ShukeBta
68a5a1e3c0
Fix Emby playback routes and stream compatibility
2026-05-28 16:00:09 +08:00
ShukeBta
e93eb40f4e
Add commit message generation
2026-05-28 14:55:01 +08:00
ShukeBta
f553674b71
Update commit message generation
2026-05-28 14:52:52 +08:00
ShukeBta
32ccb33fed
Fix local adult metadata and watch history removal
2026-05-28 14:52:20 +08:00
ShukeBta
352edd86ed
Fix series selection playback and query cleaning
2026-05-28 08:47:49 +08:00
ShukeBta
5baf9515ea
TG Bot 命令交互 + UI 圆角色差深度优化 + 通知配置修复
...
## TG Bot 交互命令系统 (新增)
- telegram_bot.go: 命令路由 + /start /help /status /search /downloads /stats
- telegram_webhook.go: Webhook 接收 + Polling 管理端点
- Polling 模式: 无需公网 HTTPS, 服务器启动自动轮询
- HTML parse_mode 统一消息格式
## 通知配置 BUG 修复
- validateChannel 添加 email 类型支持
- 前后端字段统一: channel_type -> type
- ListByType 新增仓库方法
## UI 深度优化
- glass-panel: 添加 rounded-2xl + 可见边框 + padding
- card: 添加 p-4 sm:p-6
- 全局 rounded-md -> rounded-xl, 裸 rounded -> rounded-lg
- 500+ 深色硬编码类名清零
- text-gray-400 -> gray-500 色差提升
- 按钮组 flex-wrap 防溢出
- data-table 表格溢出截断
2026-05-28 08:35:59 +08:00
ShukeBta
3a2db6bdd9
feat: Emby 兼容层完整实现 + 多模块功能增强
...
## Emby/Jellyfin 兼容层 (emby_compat.go / emby.go)
- 新增 SystemInfoPublic、FindUser、Items、Item、LatestItems、ResumeItems
- 新增 SetFavorite、MarkPlayed、RecordProgress 用户播放状态同步
- 新增 itemPayload、mediaSource、mediaStreams 媒体信息组装
- 双前缀路由 /emby/* 和 / 根路径,兼容 Infuse/Yamby/Senplayer/Kodi
- 新增 Ping、SystemEndpoint、AuthByName 端点
- emby.go 扩展对应 handler 函数
## 站点适配器 (site_adapter.go / site.go)
- SiteConfig 扩展 UserAgent/Timeout/Extra/FlareSolverrURL 字段
- doRequest() GET 请求支持 FlareSolverr 代理绕过 Cloudflare/WAF
- MTeam api_key 认证改为 Authorization: Bearer 格式
- Search() 重构为 sync.WaitGroup 并发执行,提升多站搜索性能
- siteModelToConfig() 改为 SiteService 方法,按 BrowserEmulation 填充 FlareSolverrURL
## 图片代理 (image_proxy.go)
- 重构图片代理服务,支持更多来源和缓存策略
## 下载管理 (downloads.go / download_clients.go / qbittorrent.go)
- 下载任务增强:状态管理、进度追踪优化
- qBittorrent 客户端连接稳定性改进
## 刮削与数据库 (scraper.go / tmdb.go / repository.go)
- 刮削器增强 TMDB 集成,补全元数据字段
- repository 扩展查询方法
## 前端 (web/src/)
- HomePage: 首页布局重构,按媒体库分组展示,系列聚合优化
- DiscoverPage: 发现页增强,错误处理改进(API key 缺失/网络错误分离)
- PosterWallPage: 海报墙优化,系列聚合展示
- MediaCard: 媒体卡片优化
- PlayerPage: 播放器改进
- 新增 utils/groupSeries.ts: 系列聚合工具函数
- .gitignore: 添加 .tmp_* 临时文件排除规则
2026-05-26 16:09:13 +08:00
ShukeBta
5d1ae91419
feat: 站点适配器 FlareSolverr 集成 + 并发搜索优化
...
- site_adapter.go: SiteConfig 扩展 UserAgent/Timeout/Extra/FlareSolverrURL 字段
- site_adapter.go: doRequest() GET 请求支持 FlareSolverr 代理绕过 Cloudflare/WAF
- site_adapter.go: buildRequest() 使用 cfg.UserAgent(覆盖默认 UA)
- site_adapter.go: MTeam api_key 认证改为 Authorization: Bearer 格式
- site_adapter.go: 修复 2 个 go vet 冗余 StatusFound 警告
- site.go: Search() 重构为 sync.WaitGroup 并发执行,提升多站搜索性能
- site.go: siteModelToConfig() 改为 SiteService 方法,按 BrowserEmulation 填充 FlareSolverrURL
- site.go: Search() 空关键词返回 [] 而非 error,nil slice 防护
- 新增 system_handler.go: 系统工具探测接口
- 新增 ffmpeg_auto_install.go: FFmpeg 自动安装服务
- 新增 scripts/install-ffmpeg.ps1: Windows FFmpeg 安装脚本
2026-05-24 17:14:47 +08:00
ShukeBta
68083a2840
feat: 实现下载完成后自动触发智能分类整理
...
- 添加 AutoAfterDownload 配置字段到 OrganizerConfig
- 设置默认值为 false
- 修改 DownloadService 结构,添加 organizer 和 prevStates 字段
- 修改 NewDownloadService 构造函数,接受 organizer 参数
- 修改 service.go 初始化顺序,将 organizer 创建移到 downloads 之前
- 修改 poll() 方法,检测下载完成并触发整理
- 实现 onTorrentComplete() 方法,根据 savePath 查找 Media 并整理
2026-05-18 03:10:29 +08:00
ShukeBta
ff14251371
feat: 前端显示元数据信息并添加智能分类状态提示
...
- Media 类型添加 languages/countries/genres 字段
- MediaDetailPage 显示元数据 badges(Languages/Countries/Genres)
- ToolsPage OrganizePanel 显示智能分类启用状态
- Badge 组件支持 className prop
- 添加 parseCSV 辅助函数处理逗号分隔字符串
2026-05-18 02:57:45 +08:00
ShukeBta
a98429c02a
feat: 实现智能分类功能
...
- 配置模型扩展(OrganizerConfig:smart_classify + categories)
- 数据模型扩展(Media:languages/countries/genres 字段)
- TMDbProvider 增强(GetDetails 方法获取扩展元数据)
- Scraper 服务增强(保存 languages/countries/genres 到数据库)
- Organizer 智能分类逻辑(根据元数据自动分类到子目录)
- 前端 SettingsPage 添加智能分类开关
- 后端支持从数据库读取 organizer.smart_classify 设置
Task #90-94 完成,Task #95 部分完成
2026-05-18 02:49:28 +08:00
ShukeBta
7fa99a5669
fix: 使 TMDbProvider 支持从数据库读取 API Key
...
- 修改 TMDbProvider 添加 apiConfig *APIConfigService 字段
- NewTMDbProvider 接受 apiConfig 参数(可为 nil)
- 添加 resolveAPIKey(ctx) 方法:优先从 config 读取,回退到数据库
- 添加 resolveBaseURL(ctx) 方法:解析基础 URL
- 修改 SearchMovie 使用 resolveAPIKey / resolveBaseURL
- 修改 DiscoverService.Fetch 使用 resolveAPIKey / resolveBaseURL
- 调整 service.go 初始化顺序,确保 tmdb 在 scraper 之前初始化
- 构建验证通过
2026-05-18 01:57:48 +08:00
ShukeBta
cdd28b8b88
feat: 添加 FlareSolverr 配置支持以绕过 Cloudflare/WAF
...
- 在 config.example.yaml 中添加 flaresolverr 配置段
- 在 internal/config/config.go 中添加 FlareSolverrConfig 结构体
- 修改 SiteService 接收 flaresolverr URL
- 更新 TestConnection 使用配置的 FlareSolverr URL
- 构建验证通过
2026-05-18 01:46:48 +08:00
ShukeBta
a8e825ec13
fix: 增强站点连接测试HTTP请求头,添加浏览器仿真与FlareSolverr支持
...
- 新增 internal/helper/http.go:带浏览器仿真请求头和Cloudflare/WAF绕过支持
- TestSiteConnectivity 支持 FlareSolverr 代理(需配置 flareSolverrUrl)
- 检测 Cloudflare challenge 页面并返回友好错误信息
- 重构 service/site.go TestConnection 使用新的 helper 方法
2026-05-18 01:41:00 +08:00