Implement basic metadata and image providers for episodes

This commit is contained in:
DarkFighterLuke
2024-03-09 16:57:11 +01:00
parent bb8d31b122
commit ebf7725ca6
9 changed files with 506 additions and 0 deletions
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Net.Http;
using Jellyfin.Plugin.TubeArchivistMetadata.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
@@ -23,6 +24,11 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata
: base(applicationPaths, xmlSerializer)
{
Instance = this;
HttpClientHandler handler = new HttpClientHandler();
handler.AllowAutoRedirect = false;
handler.CheckCertificateRevocationList = true;
HttpClient = new HttpClient(handler);
HttpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Token", Instance?.Configuration.TubeArchivistApiKey);
}
/// <inheritdoc />
@@ -36,6 +42,11 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata
/// </summary>
public static Plugin? Instance { get; private set; }
/// <summary>
/// Gets the HTTP client used globally in the plugin.
/// </summary>
public HttpClient HttpClient { get; }
/// <inheritdoc />
public IEnumerable<PluginPageInfo> GetPages() => new[]
{