aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-04-11 19:33:36 +0900
committerdkanada <dkanada@users.noreply.github.com>2020-04-11 19:33:36 +0900
commit8e9aeb84b18f43b6fe8dd89ab84f1627bf2e8dbd (patch)
tree6b2e84fbeae99db49aa423d8dee5067f43e30551
parent974a04c12939068b23b62ee6ebb1e7fc2e830eec (diff)
remove release channel from plugin classes
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs14
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs21
-rw-r--r--MediaBrowser.Api/PackageService.cs10
-rw-r--r--MediaBrowser.Common/IApplicationHost.cs6
-rw-r--r--MediaBrowser.Common/Updates/IInstallationManager.cs8
-rw-r--r--MediaBrowser.Model/Services/IHasRequestFilter.cs10
-rw-r--r--MediaBrowser.Model/System/SystemInfo.cs2
-rw-r--r--MediaBrowser.Model/Updates/InstallationInfo.cs6
-rw-r--r--MediaBrowser.Model/Updates/ReleaseChannel.cs18
-rw-r--r--MediaBrowser.Model/Updates/VersionInfo.cs6
10 files changed, 15 insertions, 86 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index ad77ab8b4..3cf4d6c6d 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -211,19 +211,6 @@ namespace Emby.Server.Implementations
public 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.Implementations
SupportsLibraryMonitor = 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.cs
index 1450c74d2..a00dec4c3 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.Updates
IEnumerable<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.Updates
return 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 installed
foreach (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.Updates
Id = 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 processing
if (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.cs
index ccc978295..444354a99 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.Api
packages,
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.cs
index c88eac27a..695e6f875 100644
--- a/MediaBrowser.Common/IApplicationHost.cs
+++ b/MediaBrowser.Common/IApplicationHost.cs
@@ -48,12 +48,6 @@ namespace MediaBrowser.Common
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>
/// <value>The application version.</value>
diff --git a/MediaBrowser.Common/Updates/IInstallationManager.cs b/MediaBrowser.Common/Updates/IInstallationManager.cs
index 284e418d9..4d512220b 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.cs
index c81e49e4e..418d5c501 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.
- /// &lt;0 Executed before global request filters
- /// &gt;0 Executed after global request filters
+ /// &lt;0 Executed before global request filters.
+ /// &gt;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.cs
index da39ee208..bda43e1af 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.cs
index 870bf8c0b..95357262a 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.cs
deleted file mode 100644
index ed4a774a7..000000000
--- 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.cs
index ad893db2e..177b8dbc3 100644
--- a/MediaBrowser.Model/Updates/VersionInfo.cs
+++ b/MediaBrowser.Model/Updates/VersionInfo.cs
@@ -35,12 +35,6 @@ namespace MediaBrowser.Model.Updates
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>
/// <value>The description.</value>