feat:二级分类支持发行年份

This commit is contained in:
jxxghp
2025-05-15 15:52:42 +08:00
parent ba2293eb30
commit 9d02206fd9
2 changed files with 7 additions and 1 deletions

View File

@@ -115,7 +115,12 @@ class CategoryHelper(metaclass=Singleton):
for attr, value in item.items():
if not value:
continue
info_value = tmdb_info.get(attr)
if attr == "release_year":
info_value = tmdb_info.get("release_date") or tmdb_info.get("first_air_date")
if info_value:
info_value = str(info_value)[:4]
else:
info_value = tmdb_info.get(attr)
if not info_value:
match_flag = False
continue

View File

@@ -5,6 +5,7 @@
# `original_language` 语种,具体含义参考下方字典
# `production_countries` 国家或地区(电影)、`origin_country` 国家或地区(电视剧),具体含义参考下方字典
# `genre_ids` 内容类型,具体含义参考下方字典
# `release_year` 发行年份格式YYYY电影实际对应`release_date`字段,电视剧实际对应`first_air_date`字段
# themoviedb 详情API返回的其它一级字段
# 4. 配置多项条件时需要同时满足,一个条件需要匹配多个值是使用`,`分隔