The Free Software Media System - Server Backend & API
Remove obsolete code for premium plugins
Bond_009acf30e00ce11
diff --git a/Jellyfin.Api/Controllers/PluginsController.cs b/Jellyfin.Api/Controllers/PluginsController.csindex b41df1abb1..b227dba2df 100644--- a/Jellyfin.Api/Controllers/PluginsController.cs+++ b/Jellyfin.Api/Controllers/PluginsController.cs@@ -7,7 +7,6 @@ using System.Text.Json;using System.Threading.Tasks;using Jellyfin.Api.Attributes;using Jellyfin.Api.Constants;-using Jellyfin.Api.Models.PluginDtos;using Jellyfin.Extensions.Json;using MediaBrowser.Common.Plugins;using MediaBrowser.Common.Updates;@@ -43,61 +42,6 @@ namespace Jellyfin.Api.Controllers_serializerOptions = JsonDefaults.Options;}- /// <summary>- /// Get plugin security info.- /// </summary>- /// <response code="200">Plugin security info returned.</response>- /// <returns>Plugin security info.</returns>- [Obsolete("This endpoint should not be used.")]- [HttpGet("SecurityInfo")]- [ProducesResponseType(StatusCodes.Status200OK)]- public static ActionResult<PluginSecurityInfo> GetPluginSecurityInfo()- {- return new PluginSecurityInfo- {- IsMbSupporter = true,- SupporterKey = "IAmTotallyLegit"- };- }-- /// <summary>- /// Gets registration status for a feature.- /// </summary>- /// <param name="name">Feature name.</param>- /// <response code="200">Registration status returned.</response>- /// <returns>Mb registration record.</returns>- [Obsolete("This endpoint should not be used.")]- [HttpPost("RegistrationRecords/{name}")]- [ProducesResponseType(StatusCodes.Status200OK)]- public static ActionResult<MBRegistrationRecord> GetRegistrationStatus([FromRoute, Required] string name)- {- return new MBRegistrationRecord- {- IsRegistered = true,- RegChecked = true,- TrialVersion = false,- IsValid = true,- RegError = false- };- }-- /// <summary>- /// Gets registration status for a feature.- /// </summary>- /// <param name="name">Feature name.</param>- /// <response code="501">Not implemented.</response>- /// <returns>Not Implemented.</returns>- /// <exception cref="NotImplementedException">This endpoint is not implemented.</exception>- [Obsolete("Paid plugins are not supported")]- [HttpGet("Registrations/{name}")]- [ProducesResponseType(StatusCodes.Status501NotImplemented)]- public static ActionResult GetRegistration([FromRoute, Required] string name)- {- // TODO Once we have proper apps and plugins and decide to break compatibility with paid plugins,- // delete all these registration endpoints. They are only kept for compatibility.- throw new NotImplementedException();- }-/// <summary>/// Gets a list of currently installed plugins./// </summary>@@ -317,20 +261,5 @@ namespace Jellyfin.Api.Controllersreturn NotFound();}-- /// <summary>- /// Updates plugin security info.- /// </summary>- /// <param name="pluginSecurityInfo">Plugin security info.</param>- /// <response code="204">Plugin security info updated.</response>- /// <returns>An <see cref="NoContentResult"/>.</returns>- [Obsolete("This endpoint should not be used.")]- [HttpPost("SecurityInfo")]- [Authorize(Policy = Policies.RequiresElevation)]- [ProducesResponseType(StatusCodes.Status204NoContent)]- public ActionResult UpdatePluginSecurityInfo([FromBody, Required] PluginSecurityInfo pluginSecurityInfo)- {- return NoContent();- }}}diff --git a/Jellyfin.Api/Models/PluginDtos/MBRegistrationRecord.cs b/Jellyfin.Api/Models/PluginDtos/MBRegistrationRecord.csdeleted file mode 100644index 7f1255f4b6..0000000000--- a/Jellyfin.Api/Models/PluginDtos/MBRegistrationRecord.cs+++ /dev/null@@ -1,40 +0,0 @@-using System;--namespace Jellyfin.Api.Models.PluginDtos-{- /// <summary>- /// MB Registration Record.- /// </summary>- public class MBRegistrationRecord- {- /// <summary>- /// Gets or sets expiration date.- /// </summary>- public DateTime ExpirationDate { get; set; }-- /// <summary>- /// Gets or sets a value indicating whether is registered.- /// </summary>- public bool IsRegistered { get; set; }-- /// <summary>- /// Gets or sets a value indicating whether reg checked.- /// </summary>- public bool RegChecked { get; set; }-- /// <summary>- /// Gets or sets a value indicating whether reg error.- /// </summary>- public bool RegError { get; set; }-- /// <summary>- /// Gets or sets a value indicating whether trial version.- /// </summary>- public bool TrialVersion { get; set; }-- /// <summary>- /// Gets or sets a value indicating whether is valid.- /// </summary>- public bool IsValid { get; set; }- }-}diff --git a/Jellyfin.Api/Models/PluginDtos/PluginSecurityInfo.cs b/Jellyfin.Api/Models/PluginDtos/PluginSecurityInfo.csdeleted file mode 100644index a90398425a..0000000000--- a/Jellyfin.Api/Models/PluginDtos/PluginSecurityInfo.cs+++ /dev/null@@ -1,18 +0,0 @@-namespace Jellyfin.Api.Models.PluginDtos-{- /// <summary>- /// Plugin security info.- /// </summary>- public class PluginSecurityInfo- {- /// <summary>- /// Gets or sets the supporter key.- /// </summary>- public string? SupporterKey { get; set; }-- /// <summary>- /// Gets or sets a value indicating whether is mb supporter.- /// </summary>- public bool IsMbSupporter { get; set; }- }-}