mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 13:58:29 +01:00
improve identify feature
This commit is contained in:
@@ -13,6 +13,7 @@ using System.Threading.Tasks;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Model.Providers;
|
||||
|
||||
namespace MediaBrowser.Providers.Manager
|
||||
{
|
||||
@@ -136,6 +137,11 @@ namespace MediaBrowser.Providers.Manager
|
||||
{
|
||||
var id = itemOfType.GetLookupInfo();
|
||||
|
||||
if (refreshOptions.SearchResult != null)
|
||||
{
|
||||
ApplySearchResult(id, refreshOptions.SearchResult);
|
||||
}
|
||||
|
||||
//await FindIdentities(id, cancellationToken).ConfigureAwait(false);
|
||||
id.IsAutomated = refreshOptions.IsAutomated;
|
||||
|
||||
@@ -207,6 +213,13 @@ namespace MediaBrowser.Providers.Manager
|
||||
return updateType;
|
||||
}
|
||||
|
||||
private void ApplySearchResult(ItemLookupInfo lookupInfo, RemoteSearchResult result)
|
||||
{
|
||||
lookupInfo.ProviderIds = result.ProviderIds;
|
||||
lookupInfo.Name = result.Name;
|
||||
lookupInfo.Year = result.ProductionYear;
|
||||
}
|
||||
|
||||
private async Task FindIdentities(TIdType id, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user