mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-22 00:32:50 +08:00
feat(media): 媒体信息补充 TVDB slug 字段,修复 TheTvDb 数字 ID 链接 404
TVDB 已弃用数字 ID 直达 URL,仅 slug 形式可访问。详情接口在电视剧有 TVDB ID 时通过轻量 get_series 接口获取 slug,并随 MediaInfo 合并下发。Closes jxxghp/MoviePilot-Frontend#643
This commit is contained in:
@@ -521,6 +521,11 @@ async def detail(
|
||||
# 识别
|
||||
if mediainfo:
|
||||
await mediachain.async_obtain_images(mediainfo)
|
||||
# 电视剧且有 TVDB ID 时,补充获取 slug 用于构建 TheTvDb 直达链接
|
||||
if mediainfo.type == MediaType.TV and mediainfo.tvdb_id and not mediainfo.tvdb_slug:
|
||||
slug = mediachain.tvdb_slug(mediainfo.tvdb_id)
|
||||
if slug:
|
||||
mediainfo.tvdb_slug = slug
|
||||
return mediainfo.to_dict()
|
||||
|
||||
return schemas.MediaInfo()
|
||||
|
||||
Reference in New Issue
Block a user