Support movie collections
This commit is contained in:
parent
885217fd10
commit
e982ea1233
|
@ -134,15 +134,15 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
movie.SetProviderId(MetadataProvider.Imdb, subject.Imdb);
|
||||
|
||||
// 通过imdb获取TMDB id
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
tmdbId = await this.GetTmdbIdByImdbAsync(subject.Imdb, info.MetadataLanguage, cancellationToken).ConfigureAwait(false);
|
||||
if (!string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
movie.SetProviderId(MetadataProvider.Tmdb, tmdbId);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取电影系列信息
|
||||
if (this.config.EnableTmdbCollection)
|
||||
// 通过imdb获取电影系列信息
|
||||
if (this.config.EnableTmdbCollection && !string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
var movieResult = await _tmdbApi
|
||||
.GetMovieAsync(Convert.ToInt32(tmdbId, CultureInfo.InvariantCulture), info.MetadataLanguage, info.MetadataLanguage, cancellationToken)
|
||||
|
@ -152,9 +152,8 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
movie.CollectionName = movieResult.BelongsToCollection.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
result.Item = movie;
|
||||
result.QueriedById = true;
|
||||
result.HasMetadata = true;
|
||||
|
|
|
@ -121,19 +121,17 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
PremiereDate = subject.ScreenTime,
|
||||
};
|
||||
|
||||
// 通过imdb获取tmdbId
|
||||
if (!string.IsNullOrEmpty(subject.Imdb))
|
||||
{
|
||||
item.SetProviderId(MetadataProvider.Imdb, subject.Imdb);
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
|
||||
// 通过imdb获取TMDB id
|
||||
tmdbId = await this.GetTmdbIdByImdbAsync(subject.Imdb, info.MetadataLanguage, cancellationToken).ConfigureAwait(false);
|
||||
if (!string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
item.SetProviderId(MetadataProvider.Tmdb, tmdbId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 尝试通过搜索匹配获取tmdbId
|
||||
if (string.IsNullOrEmpty(tmdbId))
|
||||
|
|
Loading…
Reference in New Issue