mirror of
https://github.com/metatube-community/jellyfin-plugin-metatube.git
synced 2026-07-16 19:40:54 +08:00
Support update info
This commit is contained in:
@@ -105,6 +105,12 @@ public static class ApiClient
|
||||
return await GetActorInfo(id, provider, string.Empty, true, cancellationToken);
|
||||
}
|
||||
|
||||
public static async Task<ActorInfoModel> GetActorInfo(string id, string provider, bool lazy,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
return await GetActorInfo(id, provider, string.Empty, lazy, cancellationToken);
|
||||
}
|
||||
|
||||
public static async Task<ActorInfoModel> GetActorInfo(string id, string provider, string url, bool lazy,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -124,6 +130,12 @@ public static class ApiClient
|
||||
return await GetMovieInfo(id, provider, string.Empty, language, true, cancellationToken);
|
||||
}
|
||||
|
||||
public static async Task<MovieInfoModel> GetMovieInfo(string id, string provider, bool lazy,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
return await GetMovieInfo(id, provider, string.Empty, string.Empty, lazy, cancellationToken);
|
||||
}
|
||||
|
||||
public static async Task<MovieInfoModel> GetMovieInfo(string id, string provider, string url, string language,
|
||||
bool lazy, CancellationToken cancellationToken)
|
||||
{
|
||||
|
||||
@@ -82,8 +82,13 @@ public class ActorProvider : BaseProvider, IRemoteMetadataProvider<Person, Perso
|
||||
LogInfo("Search for actor: {0}", pid.Id);
|
||||
|
||||
var results = new List<RemoteSearchResult>();
|
||||
var searchResults = new List<ActorSearchResultModel>();
|
||||
|
||||
if (pid.UpdateInfo == true)
|
||||
searchResults.Add(await ApiClient.GetActorInfo(pid.Id, pid.Provider, false, cancellationToken));
|
||||
else
|
||||
searchResults.AddRange(await ApiClient.SearchActor(pid.Id, pid.Provider, cancellationToken));
|
||||
|
||||
var searchResults = await ApiClient.SearchActor(pid.Id, pid.Provider, cancellationToken);
|
||||
if (!searchResults.Any())
|
||||
{
|
||||
LogInfo("Actor not found: {0}", pid.Id);
|
||||
|
||||
@@ -115,8 +115,13 @@ public class MovieProvider : BaseProvider, IRemoteMetadataProvider<Movie, MovieI
|
||||
LogInfo("Search for movie: {0}", pid.Id);
|
||||
|
||||
var results = new List<RemoteSearchResult>();
|
||||
var searchResults = new List<MovieSearchResultModel>();
|
||||
|
||||
if (pid.UpdateInfo == true)
|
||||
searchResults.Add(await ApiClient.GetMovieInfo(pid.Id, pid.Provider, false, cancellationToken));
|
||||
else
|
||||
searchResults.AddRange(await ApiClient.SearchMovie(pid.Id, pid.Provider, cancellationToken));
|
||||
|
||||
var searchResults = await ApiClient.SearchMovie(pid.Id, pid.Provider, cancellationToken);
|
||||
if (!searchResults.Any())
|
||||
{
|
||||
LogInfo("Movie not found: {0}", pid.Id);
|
||||
|
||||
Reference in New Issue
Block a user