chore: update text processing dependencies

This commit is contained in:
jxxghp
2026-05-23 12:18:59 +08:00
parent 5f0ae3a75e
commit 00fc8b2f53
12 changed files with 87 additions and 215 deletions
+2 -3
View File
@@ -2,12 +2,11 @@ import re
import traceback
from typing import Optional, List
import zhconv
from app.core.config import settings
from app.log import logger
from app.schemas.types import MediaType
from app.utils.string import StringUtils
from app.utils.zhconv import convert as zhconv_convert
from .tmdbv3api import TMDb, Search, Movie, TV, Season, Episode, Discover, Trending, Person, Collection
from .tmdbv3api.exceptions import TMDbException
@@ -726,7 +725,7 @@ class TmdbApi:
if iso_3166_1 == "CN":
title = alternative_title.get("title")
if title and StringUtils.is_chinese(title) \
and zhconv.convert(title, "zh-hans") == title:
and zhconv_convert(title, "zh-hans") == title:
return title
return tmdbinfo.get("title") if tmdbinfo.get("media_type") == MediaType.MOVIE else tmdbinfo.get("name")