diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-11 21:47:46 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-11 21:47:46 +0200 |
commit | f60e3645e18a7f590dc913d0f555fcb82f072d07 (patch) | |
tree | 3e74108cecc54086c5c5241ad9751efa549fd298 /Plugin.cs | |
download | JCoverXtremePro-f60e3645e18a7f590dc913d0f555fcb82f072d07.tar.gz JCoverXtremePro-f60e3645e18a7f590dc913d0f555fcb82f072d07.tar.bz2 JCoverXtremePro-f60e3645e18a7f590dc913d0f555fcb82f072d07.zip |
init
Diffstat (limited to 'Plugin.cs')
-rw-r--r-- | Plugin.cs | 51 |
1 files changed, 51 insertions, 0 deletions
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<PluginConfiguration>, IHasWebPages +{ + public Plugin( + IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, + ILibraryManager libraryManager, ILogger<Plugin> 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<Plugin> Logger { get; private set; } + + /// <inheritdoc /> + public IEnumerable<PluginPageInfo> GetPages() + { + return new[] + { + new PluginPageInfo + { + Name = Name, + EmbeddedResourcePath = string.Format(CultureInfo.InvariantCulture, "{0}.Configuration.configPage.html", + GetType().Namespace) + } + }; + } +}
\ No newline at end of file |