The Free Software Media System - Server Backend & API
remove release channel from plugin classes
dkanada8e9aeb84b18f
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex ad77ab8b48..3cf4d6c6df 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -211,19 +211,6 @@ namespace Emby.Server.Implementationspublic IFileSystem FileSystemManager { get; set; }- /// <inheritdoc />- public ReleaseChannel SystemUpdateLevel- {- get- {-#if NIGHTLY- return PackageChannel.Nightly;-#else- return ReleaseChannel.Stable;-#endif- }- }-/// <summary>/// Gets or sets the service provider./// </summary>@@ -1416,7 +1403,6 @@ namespace Emby.Server.ImplementationsSupportsLibraryMonitor = true,EncoderLocation = MediaEncoder.EncoderLocation,SystemArchitecture = RuntimeInformation.OSArchitecture,- SystemUpdateLevel = SystemUpdateLevel,PackageName = StartupOptions.PackageName};}diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.csindex 1450c74d2d..a00dec4c3a 100644--- a/Emby.Server.Implementations/Updates/InstallationManager.cs+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs@@ -150,13 +150,11 @@ namespace Emby.Server.Implementations.Updates/// <inheritdoc />public IEnumerable<VersionInfo> GetCompatibleVersions(IEnumerable<VersionInfo> availableVersions,- Version minVersion = null,- ReleaseChannel releaseChannel = ReleaseChannel.Stable)+ Version minVersion = null){var appVer = _applicationHost.ApplicationVersion;availableVersions = availableVersions- .Where(x => x.channel == releaseChannel- && Version.Parse(x.minimumServerVersion) <= appVer);+ .Where(x => Version.Parse(x.minimumServerVersion) <= appVer);if (minVersion != null){@@ -171,8 +169,7 @@ namespace Emby.Server.Implementations.UpdatesIEnumerable<PackageInfo> availablePackages,string name = null,Guid guid = default,- Version minVersion = null,- ReleaseChannel releaseChannel = ReleaseChannel.Stable)+ Version minVersion = null){var package = FilterPackages(availablePackages, name, guid).FirstOrDefault();@@ -184,8 +181,7 @@ namespace Emby.Server.Implementations.Updatesreturn GetCompatibleVersions(package.versions,- minVersion,- releaseChannel);+ minVersion);}/// <inheritdoc />@@ -193,12 +189,10 @@ namespace Emby.Server.Implementations.Updates{var catalog = await GetAvailablePackages(cancellationToken).ConfigureAwait(false);- var systemUpdateLevel = _applicationHost.SystemUpdateLevel;-// Figure out what needs to be installedforeach (var plugin in _applicationHost.Plugins){- var compatibleVersions = GetCompatibleVersions(catalog, plugin.Name, plugin.Id, plugin.Version, systemUpdateLevel);+ var compatibleVersions = GetCompatibleVersions(catalog, plugin.Name, plugin.Id, plugin.Version);var version = compatibleVersions.FirstOrDefault(y => y.versionCode > plugin.Version);if (version != null&& !CompletedInstallations.Any(x => string.Equals(x.AssemblyGuid, version.guid, StringComparison.OrdinalIgnoreCase)))@@ -221,7 +215,6 @@ namespace Emby.Server.Implementations.UpdatesId = Guid.NewGuid(),Name = package.name,AssemblyGuid = package.guid,- UpdateClass = package.channel,Version = package.versionString};@@ -313,13 +306,13 @@ namespace Emby.Server.Implementations.Updates// Do plugin-specific processingif (plugin == null){- _logger.LogInformation("New plugin installed: {0} {1} {2}", package.name, package.versionString ?? string.Empty, package.channel);+ _logger.LogInformation("New plugin installed: {0} {1} {2}", package.name, package.versionString ?? string.Empty);PluginInstalled?.Invoke(this, new GenericEventArgs<VersionInfo>(package));}else{- _logger.LogInformation("Plugin updated: {0} {1} {2}", package.name, package.versionString ?? string.Empty, package.channel);+ _logger.LogInformation("Plugin updated: {0} {1} {2}", package.name, package.versionString ?? string.Empty);PluginUpdated?.Invoke(this, new GenericEventArgs<(IPlugin, VersionInfo)>((plugin, package)));}diff --git a/MediaBrowser.Api/PackageService.cs b/MediaBrowser.Api/PackageService.csindex ccc978295c..444354a992 100644--- a/MediaBrowser.Api/PackageService.cs+++ b/MediaBrowser.Api/PackageService.cs@@ -71,13 +71,6 @@ namespace MediaBrowser.Api/// <value>The version.</value>[ApiMember(Name = "Version", Description = "Optional version. Defaults to latest version.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]public string Version { get; set; }-- /// <summary>- /// Gets or sets the update class.- /// </summary>- /// <value>The update class.</value>- [ApiMember(Name = "UpdateClass", Description = "Optional update class (Dev, Beta, Release). Defaults to Release.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]- public ReleaseChannel UpdateClass { get; set; }}/// <summary>@@ -152,8 +145,7 @@ namespace MediaBrowser.Apipackages,request.Name,string.IsNullOrEmpty(request.AssemblyGuid) ? Guid.Empty : Guid.Parse(request.AssemblyGuid),- string.IsNullOrEmpty(request.Version) ? null : Version.Parse(request.Version),- request.UpdateClass).FirstOrDefault();+ string.IsNullOrEmpty(request.Version) ? null : Version.Parse(request.Version)).FirstOrDefault();if (package == null){diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.csindex c88eac27a1..695e6f8752 100644--- a/MediaBrowser.Common/IApplicationHost.cs+++ b/MediaBrowser.Common/IApplicationHost.cs@@ -47,12 +47,6 @@ namespace MediaBrowser.Common/// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>bool CanSelfRestart { get; }- /// <summary>- /// Gets the version class of the system.- /// </summary>- /// <value><see cref="ReleaseChannel.Stable" /> or <see cref="ReleaseChannel.Nightly" />.</value>- ReleaseChannel SystemUpdateLevel { get; }-/// <summary>/// Gets the application version./// </summary>diff --git a/MediaBrowser.Common/Updates/IInstallationManager.cs b/MediaBrowser.Common/Updates/IInstallationManager.csindex 284e418d9d..4d512220bb 100644--- a/MediaBrowser.Common/Updates/IInstallationManager.cs+++ b/MediaBrowser.Common/Updates/IInstallationManager.cs@@ -65,12 +65,10 @@ namespace MediaBrowser.Common.Updates/// </summary>/// <param name="availableVersions">The available version of the plugin.</param>/// <param name="minVersion">The minimum required version of the plugin.</param>- /// <param name="releaseChannel">The classification of updates.</param>/// <returns>All compatible versions ordered from newest to oldest.</returns>IEnumerable<VersionInfo> GetCompatibleVersions(IEnumerable<VersionInfo> availableVersions,- Version minVersion = null,- ReleaseChannel releaseChannel = ReleaseChannel.Stable);+ Version minVersion = null);/// <summary>/// Returns all compatible versions ordered from newest to oldest.@@ -79,14 +77,12 @@ namespace MediaBrowser.Common.Updates/// <param name="name">The name.</param>/// <param name="guid">The guid of the plugin.</param>/// <param name="minVersion">The minimum required version of the plugin.</param>- /// <param name="releaseChannel">The classification.</param>/// <returns>All compatible versions ordered from newest to oldest.</returns>IEnumerable<VersionInfo> GetCompatibleVersions(IEnumerable<PackageInfo> availablePackages,string name = null,Guid guid = default,- Version minVersion = null,- ReleaseChannel releaseChannel = ReleaseChannel.Stable);+ Version minVersion = null);/// <summary>/// Returns the available plugin updates.diff --git a/MediaBrowser.Model/Services/IHasRequestFilter.cs b/MediaBrowser.Model/Services/IHasRequestFilter.csindex c81e49e4eb..418d5c501e 100644--- a/MediaBrowser.Model/Services/IHasRequestFilter.cs+++ b/MediaBrowser.Model/Services/IHasRequestFilter.cs@@ -9,17 +9,17 @@ namespace MediaBrowser.Model.Services{/// <summary>/// Order in which Request Filters are executed.- /// <0 Executed before global request filters- /// >0 Executed after global request filters+ /// <0 Executed before global request filters.+ /// >0 Executed after global request filters./// </summary>int Priority { get; }/// <summary>/// The request filter is executed before the service./// </summary>- /// <param name="req">The http request wrapper</param>- /// <param name="res">The http response wrapper</param>- /// <param name="requestDto">The request DTO</param>+ /// <param name="req">The http request wrapper.</param>+ /// <param name="res">The http response wrapper.</param>+ /// <param name="requestDto">The request DTO.</param>void RequestFilter(IRequest req, HttpResponse res, object requestDto);}}diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.csindex da39ee208a..bda43e1afa 100644--- a/MediaBrowser.Model/System/SystemInfo.cs+++ b/MediaBrowser.Model/System/SystemInfo.cs@@ -27,8 +27,6 @@ namespace MediaBrowser.Model.System/// </summary>public class SystemInfo : PublicSystemInfo{- public ReleaseChannel SystemUpdateLevel { get; set; }-/// <summary>/// Gets or sets the display name of the operating system./// </summary>diff --git a/MediaBrowser.Model/Updates/InstallationInfo.cs b/MediaBrowser.Model/Updates/InstallationInfo.csindex 870bf8c0be..95357262ac 100644--- a/MediaBrowser.Model/Updates/InstallationInfo.cs+++ b/MediaBrowser.Model/Updates/InstallationInfo.cs@@ -30,11 +30,5 @@ namespace MediaBrowser.Model.Updates/// </summary>/// <value>The version.</value>public string Version { get; set; }-- /// <summary>- /// Gets or sets the update class.- /// </summary>- /// <value>The update class.</value>- public ReleaseChannel UpdateClass { get; set; }}}diff --git a/MediaBrowser.Model/Updates/ReleaseChannel.cs b/MediaBrowser.Model/Updates/ReleaseChannel.csdeleted file mode 100644index ed4a774a72..0000000000--- a/MediaBrowser.Model/Updates/ReleaseChannel.cs+++ /dev/null@@ -1,18 +0,0 @@-namespace MediaBrowser.Model.Updates-{- /// <summary>- /// Enum PackageVersionClass.- /// </summary>- public enum ReleaseChannel- {- /// <summary>- /// The stable.- /// </summary>- Stable = 0,-- /// <summary>- /// The nightly.- /// </summary>- Nightly = 1- }-}diff --git a/MediaBrowser.Model/Updates/VersionInfo.cs b/MediaBrowser.Model/Updates/VersionInfo.csindex ad893db2e2..177b8dbc33 100644--- a/MediaBrowser.Model/Updates/VersionInfo.cs+++ b/MediaBrowser.Model/Updates/VersionInfo.cs@@ -34,12 +34,6 @@ namespace MediaBrowser.Model.Updates/// <value>The version.</value>public Version versionCode { get; set; }- /// <summary>- /// Gets or sets the release channel.- /// </summary>- /// <value>The release channel for a given package version.</value>- public ReleaseChannel channel { get; set; }-/// <summary>/// Gets or sets the description./// </summary>