Plugin.cs 1.9 KB

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