From f60e3645e18a7f590dc913d0f555fcb82f072d07 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 11 Aug 2024 21:47:46 +0200 Subject: init --- Plugin.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Plugin.cs (limited to 'Plugin.cs') diff --git a/Plugin.cs b/Plugin.cs new file mode 100644 index 0000000..a4e1f6b --- /dev/null +++ b/Plugin.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net.Http; +using Jellyfin.Plugin.JellyFed.Configuration; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Plugins; +using MediaBrowser.Controller.Entities.Audio; +using MediaBrowser.Controller.Library; +using MediaBrowser.Model.Plugins; +using MediaBrowser.Model.Serialization; +using Microsoft.Extensions.Logging; + +namespace Jellyfin.Plugin.JCoverXtremePro; + +public class Plugin : BasePlugin, IHasWebPages +{ + public Plugin( + IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, + ILibraryManager libraryManager, ILogger logger, + IHttpClientFactory httpClientFactory + ) : base(applicationPaths, xmlSerializer) + { + logger.LogInformation("Loaded plugin with library manager {}", libraryManager); + MediuxDownloader.instance = new MediuxDownloader(httpClientFactory); + Instance = this; + Logger = logger; + } + + public override string Name => "JCoverXtremePro"; + + public override Guid Id => Guid.Parse("f3e43e23-4b28-4b2f-a29d-37267e2ea2e2"); + + public static Plugin? Instance { get; private set; } + + public static ILogger Logger { get; private set; } + + /// + public IEnumerable GetPages() + { + return new[] + { + new PluginPageInfo + { + Name = Name, + EmbeddedResourcePath = string.Format(CultureInfo.InvariantCulture, "{0}.Configuration.configPage.html", + GetType().Namespace) + } + }; + } +} \ No newline at end of file -- cgit