fix(jellyfin): 补上截断的编码器串类型(High Efficiency Video Coding)

This commit is contained in:
ali
2026-11-20 10:46:41 +08:00
parent 8ff1e81680
commit 0289ca9d66
4 changed files with 34 additions and 14 deletions
+8
View File
@@ -199,6 +199,10 @@ class JellyfinAdFixService:
it["Id"]: it.get("Studios") or []
for it in items if it.get("Type", "").endswith("Series")
}
series_genres = {
it["Id"]: it.get("Genres") or []
for it in items if it.get("Type", "").endswith("Series")
}
for item in targets:
hits = cls.polluted_fields(item)
@@ -223,6 +227,10 @@ class JellyfinAdFixService:
if not dto.get("Studios") and dto.get("SeriesId"):
dto["Studios"] = series_studios.get(dto["SeriesId"]) or []
# 类型同理:广告 genre 清掉后为空,继承剧集的真实类型
if not dto.get("Genres") and dto.get("SeriesId"):
dto["Genres"] = series_genres.get(dto["SeriesId"]) or []
need_refresh = bool(dto.get("Overview") and AD_PATTERN.search(dto["Overview"]))
if need_refresh:
dto["Overview"] = ""
+3 -2
View File
@@ -24,10 +24,11 @@ from core.utils import FFprobeUtil
# 广告特征:域名、Telegram、QQ 群、以及魔改 ffmpeg 特有的编码描述
# TG_CHANNEL / TG频道 是发布组把「频道名」直接塞进 ©cmt 时留下的,Jellyfin 会把它
# 当成工作室(studio)存下来,所以也要算命中
# 当成工作室(studio)存下来;High Efficiency Video Coding 是同一批魔改 ffmpeg 把
# 编码器描述写进 genre 的结果(截断后只剩前半截),所以都要算命中
AD_PATTERN = re.compile(
r"link3\.cc|yunpantv|ysepan\.com|TG@|Qqun@|WOW64\)|Advanced Audio Codec Low Comp"
r"|912484288|TG[ _]?CHANNEL|TG频道",
r"|912484288|TG[ _]?CHANNEL|TG频道|High Efficiency Video Coding|Chroma subsampling",
re.I,
)