2
0

Plugin.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #nullable disable
  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 MediaBrowser.Providers.Plugins.Tmdb
  9. {
  10. /// <summary>
  11. /// Plugin class for the TMDb library.
  12. /// </summary>
  13. public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
  14. {
  15. /// <summary>
  16. /// Initializes a new instance of the <see cref="Plugin"/> class.
  17. /// </summary>
  18. /// <param name="applicationPaths">application paths.</param>
  19. /// <param name="xmlSerializer">xml serializer.</param>
  20. public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer)
  21. : base(applicationPaths, xmlSerializer)
  22. {
  23. Instance = this;
  24. }
  25. /// <summary>
  26. /// Gets the instance of TMDb plugin.
  27. /// </summary>
  28. public static Plugin Instance { get; private set; }
  29. /// <inheritdoc/>
  30. public override Guid Id => new Guid("b8715ed1-6c47-4528-9ad3-f72deb539cd4");
  31. /// <inheritdoc/>
  32. public override string Name => "TMDb";
  33. /// <inheritdoc/>
  34. public override string Description => "Get metadata for movies and other video content from TheMovieDb.";
  35. // TODO remove when plugin removed from server.
  36. /// <inheritdoc/>
  37. public override string ConfigurationFileName => "Jellyfin.Plugin.Tmdb.xml";
  38. /// <summary>
  39. /// Return the plugin configuration page.
  40. /// </summary>
  41. /// <returns>PluginPageInfo.</returns>
  42. public IEnumerable<PluginPageInfo> GetPages()
  43. {
  44. yield return new PluginPageInfo
  45. {
  46. Name = Name,
  47. EmbeddedResourcePath = GetType().Namespace + ".Configuration.config.html"
  48. };
  49. }
  50. }
  51. }