Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
cxfksword committed Jan 7, 2023
1 parent 88ed0e2 commit eede72d
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions Jellyfin.Plugin.MetaShark/Providers/BaseProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,6 @@ protected BaseProvider(IHttpClientFactory httpClientFactory, ILogger logger, ILi


// bt种子都是英文名,但电影是中日韩泰印法地区时,都不适用相似匹配,去掉限制
// //英文关键词搜,结果是只有中文/繁体中文时,不适用相似匹配,如Who Am I
// if (jw.Similarity(searchName, item.Name) < 0.8 && jw.Similarity(searchName, item.OriginalName) < 0.8)
// {
// if (!searchName.IsSameLanguage(item.Name) && !searchName.IsSameLanguage(item.OriginalName))
// {
// // 特殊处理下使用英文搜索,只有中文标题的情况
// }
// else
// {
// continue;
// }
// }

// 不存在年份需要比较时,直接返回
if (info.Year == null || info.Year == 0)
Expand Down Expand Up @@ -147,19 +135,6 @@ protected BaseProvider(IHttpClientFactory httpClientFactory, ILogger logger, ILi
}

// bt种子都是英文名,但电影是中日韩泰印法地区时,都不适用相似匹配,去掉限制
// // this.Log($"GuestDoubanSeasonByYear name: {name} douban_name: {item.Name} douban_sid: {item.Sid} douban_year: {item.Year} score: {score} ");
// //英文关键词搜,结果是只有中文/繁体中文时,不适用相似匹配,如Who Am I
// if (jw.Similarity(name, item.Name) < 0.8 && jw.Similarity(name, item.OriginalName) < 0.8)
// {
// if (!name.IsSameLanguage(item.Name) && !name.IsSameLanguage(item.OriginalName))
// {
// // 特殊处理下使用英文搜索,只有中文标题的情况
// }
// else
// {
// continue;
// }
// }

if (year == item.Year)
{
Expand Down Expand Up @@ -192,19 +167,6 @@ protected BaseProvider(IHttpClientFactory httpClientFactory, ILogger logger, ILi
foreach (var item in movieResults)
{
// bt种子都是英文名,但电影是中日韩泰印法地区时,都不适用相似匹配,去掉限制
// if (jw.Similarity(searchName, item.Title) > 0.8
// || jw.Similarity(searchName, item.OriginalTitle) > 0.8)
// {
// this.Log($"GuestByTmdb of [name] found tmdb id: \"{item.Id}\"");
// return item.Id.ToString(CultureInfo.InvariantCulture);
// }
// // 特殊处理下使用英文搜索,只有中文标题的情况,当匹配成功
// if (!searchName.IsSameLanguage(item.Title) && !searchName.IsSameLanguage(item.OriginalTitle))
// {
// this.Log($"GuestByTmdb of [name] found tmdb id: \"{item.Id}\"");
// return item.Id.ToString(CultureInfo.InvariantCulture);
// }

return item.Id.ToString(CultureInfo.InvariantCulture);
}
break;
Expand All @@ -213,19 +175,6 @@ protected BaseProvider(IHttpClientFactory httpClientFactory, ILogger logger, ILi
foreach (var item in seriesResults)
{
// bt种子都是英文名,但电影是中日韩泰印法地区时,都不适用相似匹配,去掉限制
// if (jw.Similarity(searchName, item.Name) > 0.8
// || jw.Similarity(searchName, item.OriginalName) > 0.8)
// {
// this.Log($"GuestByTmdb of [name] found tmdb id: \"{item.Id}\"");
// return item.Id.ToString(CultureInfo.InvariantCulture);
// }
// // 特殊处理下使用英文搜索,只有中文标题的情况,当匹配成功
// if (!searchName.IsSameLanguage(item.Name) && !searchName.IsSameLanguage(item.OriginalName))
// {
// this.Log($"GuestByTmdb of [name] found tmdb id: \"{item.Id}\"");
// return item.Id.ToString(CultureInfo.InvariantCulture);
// }

return item.Id.ToString(CultureInfo.InvariantCulture);
}
break;
Expand Down

0 comments on commit eede72d

Please sign in to comment.