Skip to content

Commit

Permalink
<docs/perf>/优化双Api识别
Browse files Browse the repository at this point in the history
  • Loading branch information
Abcuders committed Jul 16, 2023
1 parent 453b95d commit c014f99
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions AutoAnimeMv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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):# 因可预见错误离场
Expand Down
4 changes: 4 additions & 0 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ QBPASSWORD = '' # Qb密码
### Log 保存位置的解释
* 默认情况下,Log文件会保存在传入的`保存路径`下,当无法访问此路径时,Log保存在工具目录下

### Api功能的解释
> Api功能默认开启,在一般情况下我们不建议关闭
* 当您同时启用 `BGMAPI``TMDBAPI`时,如果匹配出的是中文,将会优先交给 `BGMAPI` 识别,如果有返回值再把返回值交给 `TMDBAPI` 识别,如果没有则让 `TMDBAPI` 识别原匹配

## Telegram Bot通知功能(old 版本已废弃,New 版本开发中)
* **内测功能,您可以来Tg群体验**

Expand Down

0 comments on commit c014f99

Please sign in to comment.