From c014f991d659f5ae81b288852f9bff5aeb2d78d8 Mon Sep 17 00:00:00 2001 From: Abcuders Date: Sun, 16 Jul 2023 19:53:56 +0800 Subject: [PATCH] =?UTF-8?q?/=E4=BC=98=E5=8C=96=E5=8F=8CApi?= =?UTF-8?q?=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutoAnimeMv.py | 13 +++++++++++-- DOCS.md | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/AutoAnimeMv.py b/AutoAnimeMv.py index 3f31eb2..c9a5a13 100644 --- a/AutoAnimeMv.py +++ b/AutoAnimeMv.py @@ -17,7 +17,7 @@ def Start_PATH():# 初始化 # 版本 数据库缓存 Api数据缓存 Log数据集 分隔符 global Versions,AimeListCache,BgmAPIDataCache,TMDBAPIDataCache,LogData,Separator,Proxy,TgBotMsgData,PyPath - Versions = '2.6.7' + Versions = '2.7.0' AimeListCache = None BgmAPIDataCache = {} TMDBAPIDataCache = {} @@ -470,8 +470,17 @@ def TMDBApi(Name):# TMDBApi相关,返回一个标准的中文名称 if search(r'([\u4e00-\u9fa5]+)',Name.replace('-',''),flags=I) != None: # 获取匹配到的汉字 Name = search(r'([\u4e00-\u9fa5]+)',Name.replace('-',''),flags=I).group(1) ApiName = BgmApi(Name) + if ApiName != None: + TMDBApiName = TMDBApi(ApiName) + if TMDBApiName != None: + ApiName = TMDBApiName + else: + ApiName = TMDBApi(Name) else: - ApiName = TMDBApi(Name) + if USETMDBAPI == False: + ApiName = BgmApi(Name) + else: + ApiName = TMDBApi(Name) return ApiName.replace(' ','') if ApiName != None else ApiName def Auxiliary_Exit(LogMsg):# 因可预见错误离场 diff --git a/DOCS.md b/DOCS.md index 8053f05..11d3b3a 100644 --- a/DOCS.md +++ b/DOCS.md @@ -170,6 +170,10 @@ QBPASSWORD = '' # Qb密码 ### Log 保存位置的解释 * 默认情况下,Log文件会保存在传入的`保存路径`下,当无法访问此路径时,Log保存在工具目录下 +### Api功能的解释 +> Api功能默认开启,在一般情况下我们不建议关闭 +* 当您同时启用 `BGMAPI` 和 `TMDBAPI`时,如果匹配出的是中文,将会优先交给 `BGMAPI` 识别,如果有返回值再把返回值交给 `TMDBAPI` 识别,如果没有则让 `TMDBAPI` 识别原匹配 + ## Telegram Bot通知功能(old 版本已废弃,New 版本开发中) * **内测功能,您可以来Tg群体验**