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
ShukeBta
630f925725
fix: 修复站点管理API Key保存问题,移动RSS字段到主表单,修复Discover页面提示
2026-05-18 01:22:11 +08:00
ShukeBta
9827b46c49
feat(site): 补全 Site 模型 11 个缺失字段并同步前端类型
...
- model/site.go: 新增 user_agent/rss_url/timeout/priority/use_proxy/rate_limit/
browser_emulation/login_status/upload_bytes/download_bytes/downloader 11个字段
- 字段对齐 Python 原版 MediaStation Site 模型(28字段 → 23字段)
- GORM AutoMigrate 自动补列,旧数据填充默认值(timeout=15, priority=50)
- types/index.ts: Site 接口同步所有新字段(带注释)
- 后端编译 ✅ 前端构建 ✅ API 验证 ✅
2026-05-18 00:52:11 +08:00
ShukeBta
828ca36d7f
@
...
feat: Warm Industrial UI redesign + social footer + code deduplication
Design System (Phase A):
- New palette: warm charcoal #111110 / amber gold #c9954a / sage green #7a9a8a
- Fonts: Cabinet Grotesk (heading) + Geist (body) + JetBrains Mono (data)
- SVG grain texture overlay, collapsed sidebar with hover expand
- Bento grid dashboard with WideContinueCard + PosterCard + QuickLink
- Backward-compatible CSS aliases for glass-panel/neon-button/input-base
Social Footer (Phase B):
- AppFooter component with GitHub repo / author homepage / TG group links
- Embedded in LoginPage, Layout (global), and SettingsPage
- TG group badge added to README.md
Code Cleanup:
- Removed deprecated DownloadClientCard / NotifyChannelCard components
- Merged downloadClient/notify API clients into unified modules
- Route deduplication: removed authed-group duplicates for admin endpoints
- Removed redundant AdminPage tabs (sites/downloads/notify/scheduler)
- UI fixes: blank pages (discover/download-clients/notify-channels) nil slice defense
- Email channel support in NotifyChannelsPage
@
2026-05-17 23:13:26 +08:00
ShukeBta
9be81222cc
fix: 修复三个空白页面 + 许可证页面重构
...
- 修复发现页空白:后端 discover.go nil→[] Match,前端 discover.ts 加 ?? []
- 修复下载客户端页空白:后端 download_clients.go nil→[]model.DownloadClient,前端加 ?? []
- 修复通知渠道页空白:后端 notify_channels.go nil→[]struct{},前端加 ?? []
- 许可证页面重构:移除生成密钥功能,对接 LicenseServer 绑定/状态模式
- 所有变更通过 Go build + npm run build 零错误验证
2026-05-17 00:54:40 +08:00
ShukeBta
8e06b7e149
chore: remove license code, fix compilation, update README bilingual
...
- Remove all license-related code (handler/service/repository/model)
License authorization is managed by separate server:
https://github.com/ShukeBta/MediaStationLicenseServer
- Fix compilation errors: model field alignment, method name fixes,
route conflicts, struct literal corrections (7 files)
- Add Chinese README.md as primary, English README_EN.md
- Update .gitignore: exclude .workbuddy/, editor backups
- Add new repository files: assistant, play_profile, storage_config
2026-05-17 00:02:41 +08:00