TestPlugin.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.Collections.Generic;
  4. using MediaBrowser.Common.Configuration;
  5. using MediaBrowser.Common.Plugins;
  6. using MediaBrowser.Model.Plugins;
  7. using MediaBrowser.Model.Serialization;
  8. namespace Jellyfin.Server.Integration.Tests
  9. {
  10. public class TestPlugin : BasePlugin<BasePluginConfiguration>, IHasWebPages
  11. {
  12. public TestPlugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
  13. : base(applicationPaths, xmlSerializer)
  14. {
  15. Instance = this;
  16. }
  17. public static TestPlugin? Instance { get; private set; }
  18. public override Guid Id => new Guid("2d350a13-0bf7-4b61-859c-d5e601b5facf");
  19. public override string Name => nameof(TestPlugin);
  20. public override string Description => "Server test Plugin.";
  21. public IEnumerable<PluginPageInfo> GetPages()
  22. {
  23. yield return new PluginPageInfo
  24. {
  25. Name = Name,
  26. EmbeddedResourcePath = GetType().Namespace + ".TestPage.html"
  27. };
  28. yield return new PluginPageInfo
  29. {
  30. Name = "BrokenPage",
  31. EmbeddedResourcePath = GetType().Namespace + ".foobar"
  32. };
  33. }
  34. }
  35. }