Huge refactoring

Added person info provider
Added person image provider
Added trailers fetching
This commit is contained in:
PingWin committed 2021-05-22 22:21:08 +00:00
1 parent 35ce5536be
commit fce88168e8
43 files changed
+4381 -540

No files matched your search

@@ -0,0 +1,25 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Providers;
namespace Jellyfin.Plugin.Kinopoisk.MetadataProviders
{
public abstract class BaseMetadataProvider : IMetadataProvider
{
protected IHttpClientFactory _httpClientFactory;
protected BaseMetadataProvider(IHttpClientFactory httpClientFactory)
{
_httpClientFactory = httpClientFactory ?? throw new System.ArgumentNullException(nameof(httpClientFactory));
}
public string Name => Utils.ProviderName;
public async Task<HttpResponseMessage> GetImageResponse(string url, CancellationToken cancellationToken)
{
return await _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken);
}
}
}