@@ -52,13 +52,14 @@ public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(MovieInfo in
52
52
}
53
53
54
54
// 从douban搜索
55
+ // BUG注意:ProviderIds传多个meta值,会导致识别搜索时只返回一个结果
55
56
var res = await this . _doubanApi . SearchAsync ( info . Name , cancellationToken ) . ConfigureAwait ( false ) ;
56
57
result . AddRange ( res . Take ( Configuration . PluginConfiguration . MAX_SEARCH_RESULT ) . Select ( x =>
57
58
{
58
59
return new RemoteSearchResult
59
60
{
60
61
SearchProviderName = DoubanProviderName ,
61
- ProviderIds = new Dictionary < string , string > { { DoubanProviderId , x . Sid } , { Plugin . ProviderId , MetaSource . Douban } } ,
62
+ ProviderIds = new Dictionary < string , string > { { DoubanProviderId , x . Sid } } ,
62
63
ImageUrl = this . GetProxyImageUrl ( x . Img ) ,
63
64
ProductionYear = x . Year ,
64
65
Name = x . Name ,
@@ -75,7 +76,7 @@ public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(MovieInfo in
75
76
return new RemoteSearchResult
76
77
{
77
78
SearchProviderName = TmdbProviderName ,
78
- ProviderIds = new Dictionary < string , string > { { MetadataProvider . Tmdb . ToString ( ) , x . Id . ToString ( CultureInfo . InvariantCulture ) } , { Plugin . ProviderId , MetaSource . Tmdb } } ,
79
+ ProviderIds = new Dictionary < string , string > { { MetadataProvider . Tmdb . ToString ( ) , x . Id . ToString ( CultureInfo . InvariantCulture ) } } ,
79
80
Name = string . Format ( "[TMDB]{0}" , x . Title ?? x . OriginalTitle ) ,
80
81
ImageUrl = this . _tmdbApi . GetPosterUrl ( x . PosterPath ) ,
81
82
Overview = x . Overview ,
@@ -97,6 +98,11 @@ public async Task<MetadataResult<Movie>> GetMetadata(MovieInfo info, Cancellatio
97
98
var sid = info . GetProviderId ( DoubanProviderId ) ;
98
99
var tmdbId = info . GetProviderId ( MetadataProvider . Tmdb ) ;
99
100
var metaSource = info . GetProviderId ( Plugin . ProviderId ) ;
101
+ // 用于修正识别时指定tmdb,没法读取tmdb数据的BUG。。。两个合在一起太难了。。。
102
+ if ( string . IsNullOrEmpty ( metaSource ) && info . Name . StartsWith ( "[TMDB]" ) )
103
+ {
104
+ metaSource = MetaSource . Tmdb ;
105
+ }
100
106
// 注意:会存在元数据有tmdbId,但metaSource没值的情况(之前由TMDB插件刮削导致)
101
107
var hasTmdbMeta = metaSource == MetaSource . Tmdb && ! string . IsNullOrEmpty ( tmdbId ) ;
102
108
var hasDoubanMeta = metaSource != MetaSource . Tmdb && ! string . IsNullOrEmpty ( sid ) ;
0 commit comments