Commit Graph

114 Commits

Author SHA1 Message Date
jxxghp
613eb5313b feat(media): return parsed meta info when recognition fails
The recognize endpoint returned an empty context when no media matched,
so the recognition shortcut could not show the applied custom words or
the processed title, which made failures hard to diagnose. Always
return the parsed meta_info (including apply_words) and leave media_info
empty when the lookup fails.

Update the REST API docs and the generated agent skill note accordingly.

Refs #6997
2026-10-15 09:07:00 +08:00
pavel2
0d62815a0f fix(api): accept agent media type values
9 处裸构造 MediaType(x) 改为 MediaType.from_agent(x) or MediaType(x),与 search.py/site.py 既有写法一致。智能体按 API 入参规约传入 movie/tv/music 时不再抛 ValueError 返回 500,中文原生枚举值仍走原分支,无行为变化。

涉及:media.py detail、tmdb.py(3)、douban.py(2)、mediaserver.py not_exists、subscribe.py create_subscribe、transfer.py _execute_manual_transfer。
2026-10-10 09:56:47 +08:00
LIN student
873c4c7087 fix(media): 刮削接口要求管理权限,与手动整理和文件管理保持一致
POST /api/v1/media/scrape/{storage} 只依赖 verify_token,任何登录用户都可
调用。该接口以 overwrite=True 调用刮削链,会覆盖目标目录已有的海报、背景图
和 NFO,音频文件还会改写标签;存储与路径完全由请求提供。

同类写操作 /transfer/manual、/transfer/manual/target-path、/storage/* 以及
整理记录的写操作都要求 manage 权限;前端只在文件管理页(需 manage 权限)
调用该接口,Agent 策略也已把 media.scrape 定为管理员操作。

现改为依赖 get_current_active_manage_user。_scrape_impl 内部没有使用令牌
载荷,去掉其中未使用的 Depends 参数。API_TOKEN/apikey 调用解析为 SUPERUSER
对应的超级管理员,行为不变。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:42:29 +08:00
jxxghp
5d620b0cbe feat(media): support episode groups in manual scraping 2026-09-24 08:23:35 +08:00
jxxghp
ae1187bd3f feat(module): add dynamic module switches and catalogs 2026-09-11 10:31:53 +08:00
jxxghp
4972a3cdea fix(ci): close post-merge mypy regressions 2026-09-10 10:19:16 +08:00
jxxghp
0a43a307c4 fix(ci): restore architecture gate parity 2026-09-10 09:45:58 +08:00
jxxghp
02686ed674 feat(search): merge music artists into person search 2026-09-10 09:02:17 +08:00
yanjunpu
45c2254f92 fix(media): preserve search plugin ABI 2026-09-09 04:11:28 +08:00
yanjunpu
0a6c440526 fix(media): preserve unified music search contract 2026-09-09 04:05:02 +08:00
yanjunpu
2e8664c1dc fix(music): scope and rank manual search results 2026-09-09 03:57:20 +08:00
jxxghp
d0c894f5eb fix(transfer): close durable error recovery loop 2026-09-08 22:38:59 +08:00
jxxghp
ca627a4f00 fix: release plugin media sources from built-in declarations 2026-09-08 10:00:33 +08:00
jxxghp
fba0b6ae67 refactor: 统一音乐与影视的识别搜索匹配流程 2026-09-06 00:48:00 +08:00
jxxghp
7251400237 fix(api): 修复音乐详情响应校验 2026-09-05 16:42:15 +08:00
jxxghp
71147c1d96 feat(classification): support multi-source media rules 2026-09-03 11:51:18 +08:00
jxxghp
d512f528be refactor(api): make collection pagination explicit 2026-09-01 09:13:56 +08:00
jxxghp
b914e8b6e4 refactor: strengthen architecture CI gates and runtime contracts 2026-08-25 17:02:29 +08:00
jxxghp
e602c23668 refactor: clear public entrypoint complexity debt 2026-08-22 23:28:30 +08:00
jxxghp
1bb6e36e8c refactor: complete runtime configuration migration 2026-08-22 19:07:07 +08:00
jxxghp
9df599f502 refactor: split api dependencies by domain 2026-08-21 21:09:57 +08:00
jxxghp
8d62f33155 fix(plugin): 修复坏插件模块声明击穿模块调度导致接口大面积报错
- projection 只接受映射类型的 get_module 声明,非法值跳过并记日志
- dispatcher 同步/异步路径防御非映射方法表,单个坏插件被隔离
- media 端点改用 application 层插件运行时门面,消除分层违规依赖
- 图片能力测试打桩 models.dev 目录边界,适配仓库内离线目录留空

Closes #6346
2026-08-18 15:53:28 +08:00
jxxghp
dc23977b0c fix: 修复站点用户数据转换并完善媒体来源扩展 2026-08-18 14:50:09 +08:00
jxxghp
8472bcff43 refactor: 收口 V3 分层架构与插件兼容边界 2026-08-18 13:22:02 +08:00
jxxghp
5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
Aqr-K
8a11214a43 refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 (#6320) 2026-08-15 06:58:38 +08:00
jxxghp
369d7d6448 refactor: reorganize backend module boundaries 2026-08-14 19:53:33 +08:00
jxxghp
7b3444c366 refactor backend module architecture 2026-08-14 15:45:38 +08:00
jxxghp
baf8850d63 refactor(api): standardize responses and restore media config contracts 2026-08-12 23:15:13 +08:00
jxxghp
ca32922a7f refactor(media): unify media identity and chain responsibilities 2026-08-12 18:31:09 +08:00
jxxghp
8bf2f601a6 refactor(media): unify source identity and music browsing 2026-08-12 12:56:40 +08:00
jxxghp
97dba2a8ae feat: unify media recognition and music lifecycle 2026-08-12 06:51:58 +08:00
jxxghp
3f1b0cdb05 feat(music): 支持多源识别与元数据刮削 2026-08-11 23:34:00 +08:00
jxxghp
7597c21872 feat(music): 自动整理时媒体类型判别 2026-08-11 19:08:05 +08:00
jxxghp
a15b8542ea feat(music): 识别接口支持 MusicBrainz 数据源
- 选择 musicbrainz 数据源时非音频标题按音乐元数据解析
- 支持 艺术家 - 曲名 格式拆分艺术家后检索 MusicBrainz
2026-08-10 23:30:57 +08:00
jxxghp
a322c4c375 feat(media): 媒体信息补充 TVDB slug 字段,修复 TheTvDb 数字 ID 链接 404
TVDB 已弃用数字 ID 直达 URL,仅 slug 形式可访问。详情接口在电视剧有 TVDB ID 时通过轻量 get_series 接口获取 slug,并随 MediaInfo 合并下发。Closes jxxghp/MoviePilot-Frontend#643
2026-08-10 21:41:04 +08:00
jxxghp
8d71bcbddd fix: 修复音乐搜索统一入口参数名不匹配导致 500
/media/search?type=music 调用 MusicChain.async_search 时应传 query 关键字参数,
原实现误传 title 导致 TypeError;补充端点回归测试。
2026-08-09 10:54:11 +08:00
jxxghp
60aa762ca1 feat: 音乐识别与刮削统一入口整合
- 音乐识别统一走 recognize_media,移除 MusicChain.recognize/async_recognize 及 /music/search 独立端点
- 音乐刮削收拢到 MediaChain.scrape_music_metadata,消除 MusicChain 对 MediaChain 的嵌套引用
- MetaInfo/MetaInfoPath 增加 force_video 参数,影视附加音轨保留季集归属
- 整理、订阅、搜索、API 层音乐识别入口全部统一
2026-08-09 10:06:54 +08:00
jxxghp
7797d34c48 feat: 识别文件类型:音乐 2026-08-08 23:38:34 +08:00
jxxghp
c356d47807 fix(v3): complete music recognition and scraping 2026-08-07 23:46:54 +08:00
jxxghp
4abae809c2 fix: preserve parent year in media recognition 2026-08-06 12:45:48 +08:00
jxxghp
7a2b003d02 fix(media): restore legacy discover detail fallback 2026-08-05 07:27:44 +08:00
jxxghp
8d099b9581 fix(subscribe): preserve source identity when adding subscriptions 2026-07-25 08:51:30 +08:00
jxxghp
6354a48405 fix(media): fall back to main season poster (#6184) 2026-07-25 07:57:27 +08:00
jxxghp
fb32c59713 feat: add AniList rankings and discovery 2026-07-22 12:53:58 +08:00
jxxghp
3b709b7f2e feat: unify media source identity flow (#6129) 2026-07-21 20:20:09 +08:00
jxxghp
6f8b6cfbc9 feat: support explicit media ids for file scraping 2026-07-21 12:57:26 +08:00
jxxghp
e3f80af74f feat: expand metadata sources and media server sync (#6129) 2026-07-21 11:34:18 +08:00
jxxghp
0598fbdd75 fix(media): add support for custom words in media recognition 2026-07-17 09:46:55 +08:00
DDSRem
5a585839ba chore: remove unused imports and fix function name conflicts (#5764)
- Remove unused imports in anthropic.py, tmdbv3api/__init__.py, tv.py, test files
- Rename conflicting function names in subscribe.py and webhook.py
- Clean up unused re-exports in tmdbv3api/__init__.py (15 unused exports)
- Apply consistent formatting across API endpoints
2026-05-13 18:59:03 +08:00