Skip to content

Commit

Permalink
无官方中译名时,尝试使用原标题查询
Browse files Browse the repository at this point in the history
  • Loading branch information
Izumiko committed Feb 23, 2024
1 parent 714e590 commit 415db3b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ede.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,18 @@
showDebugInfo('查询失败:', error);
return null;
});
if (animaInfo.animes.length == 0) {
const seriesUrl = baseUrl + '/Users/' + userId + '/Items/' + item.SeriesId;
const seriesInfo = await getSessionInfo(seriesUrl, authorization);
animeName = seriesInfo.OriginalTitle;
searchUrl = apiPrefix + 'https://api.dandanplay.net/api/v2/search/episodes?anime=' + animeName + '&withRelated=true';
animaInfo = await makeGetRequest(searchUrl)
.then((response) => isInTampermonkey ? JSON.parse(response) : response.json())
.catch((error) => {
showDebugInfo('查询失败:', error);
return null;
});
}
if (animaInfo.animes.length == 0) {
showDebugInfo('弹幕查询无结果');
return null;
Expand Down

0 comments on commit 415db3b

Please sign in to comment.