aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs2
-rw-r--r--Emby.Server.Implementations/ConfigurationOptions.cs1
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpResultFactory.cs9
-rw-r--r--Emby.Server.Implementations/HttpServer/RangeRequestWriter.cs186
-rw-r--r--Emby.Server.Implementations/HttpServer/Security/AuthService.cs16
-rw-r--r--Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs101
-rw-r--r--Emby.Server.Implementations/IStartupOptions.cs5
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs3
-rw-r--r--Emby.Server.Implementations/Localization/Core/es_419.json2
-rw-r--r--Emby.Server.Implementations/Localization/Core/ne.json62
-rw-r--r--Emby.Server.Implementations/Networking/NetworkManager.cs189
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs58
12 files changed, 382 insertions, 252 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 23f0571a1d..14267b5613 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1234,7 +1234,7 @@ namespace Emby.Server.Implementations
if (addresses.Count == 0)
{
- addresses.AddRange(_networkManager.GetLocalIpAddresses(ServerConfigurationManager.Configuration.IgnoreVirtualInterfaces));
+ addresses.AddRange(_networkManager.GetLocalIpAddresses());
}
var resultList = new List<IPAddress>();
diff --git a/Emby.Server.Implementations/ConfigurationOptions.cs b/Emby.Server.Implementations/ConfigurationOptions.cs
index dea9b6682a..ff7ee085f8 100644
--- a/Emby.Server.Implementations/ConfigurationOptions.cs
+++ b/Emby.Server.Implementations/ConfigurationOptions.cs
@@ -17,7 +17,6 @@ namespace Emby.Server.Implementations
{
{ HostWebClientKey, bool.TrueString },
{ HttpListenerHost.DefaultRedirectKey, "web/index.html" },
- { InstallationManager.PluginManifestUrlKey, "https://repo.jellyfin.org/releases/plugin/manifest-stable.json" },
{ FfmpegProbeSizeKey, "1G" },
{ FfmpegAnalyzeDurationKey, "200M" },
{ PlaylistsAllowDuplicatesKey, bool.TrueString }
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
index 7b7da703be..970f5119c8 100644
--- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
@@ -585,7 +585,7 @@ namespace Emby.Server.Implementations.HttpServer
if (!string.IsNullOrWhiteSpace(rangeHeader) && totalContentLength.HasValue)
{
- var hasHeaders = new RangeRequestWriter(rangeHeader, totalContentLength.Value, stream, contentType, isHeadRequest, _logger)
+ var hasHeaders = new RangeRequestWriter(rangeHeader, totalContentLength.Value, stream, contentType, isHeadRequest)
{
OnComplete = options.OnComplete
};
@@ -622,8 +622,11 @@ namespace Emby.Server.Implementations.HttpServer
/// <summary>
/// Adds the caching responseHeaders.
/// </summary>
- private void AddCachingHeaders(IDictionary<string, string> responseHeaders, TimeSpan? cacheDuration,
- bool noCache, DateTime? lastModifiedDate)
+ private void AddCachingHeaders(
+ IDictionary<string, string> responseHeaders,
+ TimeSpan? cacheDuration,
+ bool noCache,
+ DateTime? lastModifiedDate)
{
if (noCache)
{
diff --git a/Emby.Server.Implementations/HttpServer/RangeRequestWriter.cs b/Emby.Server.Implementations/HttpServer/RangeRequestWriter.cs
index 540340272a..980c2cd3a8 100644
--- a/Emby.Server.Implementations/HttpServer/RangeRequestWriter.cs
+++ b/Emby.Server.Implementations/HttpServer/RangeRequestWriter.cs
@@ -1,6 +1,7 @@
#pragma warning disable CS1591
using System;
+using System.Buffers;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
@@ -8,52 +9,17 @@ using System.Net;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Services;
-using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
namespace Emby.Server.Implementations.HttpServer
{
public class RangeRequestWriter : IAsyncStreamWriter, IHttpResult
{
- /// <summary>
- /// Gets or sets the source stream.
- /// </summary>
- /// <value>The source stream.</value>
- private Stream SourceStream { get; set; }
-
- private string RangeHeader { get; set; }
-
- private bool IsHeadRequest { get; set; }
-
- private long RangeStart { get; set; }
-
- private long RangeEnd { get; set; }
-
- private long RangeLength { get; set; }
-
- private long TotalContentLength { get; set; }
-
- public Action OnComplete { get; set; }
-
- private readonly ILogger _logger;
-
private const int BufferSize = 81920;
- /// <summary>
- /// The _options.
- /// </summary>
private readonly Dictionary<string, string> _options = new Dictionary<string, string>();
- /// <summary>
- /// The us culture.
- /// </summary>
- private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
-
- /// <summary>
- /// Additional HTTP Headers.
- /// </summary>
- /// <value>The headers.</value>
- public IDictionary<string, string> Headers => _options;
+ private List<KeyValuePair<long, long?>> _requestedRanges;
/// <summary>
/// Initializes a new instance of the <see cref="RangeRequestWriter" /> class.
@@ -63,8 +29,7 @@ namespace Emby.Server.Implementations.HttpServer
/// <param name="source">The source.</param>
/// <param name="contentType">Type of the content.</param>
/// <param name="isHeadRequest">if set to <c>true</c> [is head request].</param>
- /// <param name="logger">The logger instance.</param>
- public RangeRequestWriter(string rangeHeader, long contentLength, Stream source, string contentType, bool isHeadRequest, ILogger logger)
+ public RangeRequestWriter(string rangeHeader, long contentLength, Stream source, string contentType, bool isHeadRequest)
{
if (string.IsNullOrEmpty(contentType))
{
@@ -74,7 +39,6 @@ namespace Emby.Server.Implementations.HttpServer
RangeHeader = rangeHeader;
SourceStream = source;
IsHeadRequest = isHeadRequest;
- this._logger = logger;
ContentType = contentType;
Headers[HeaderNames.ContentType] = contentType;
@@ -85,40 +49,26 @@ namespace Emby.Server.Implementations.HttpServer
}
/// <summary>
- /// Sets the range values.
+ /// Gets or sets the source stream.
/// </summary>
- private void SetRangeValues(long contentLength)
- {
- var requestedRange = RequestedRanges[0];
-
- TotalContentLength = contentLength;
-
- // If the requested range is "0-", we can optimize by just doing a stream copy
- if (!requestedRange.Value.HasValue)
- {
- RangeEnd = TotalContentLength - 1;
- }
- else
- {
- RangeEnd = requestedRange.Value.Value;
- }
-
- RangeStart = requestedRange.Key;
- RangeLength = 1 + RangeEnd - RangeStart;
+ /// <value>The source stream.</value>
+ private Stream SourceStream { get; set; }
+ private string RangeHeader { get; set; }
+ private bool IsHeadRequest { get; set; }
- Headers[HeaderNames.ContentLength] = RangeLength.ToString(CultureInfo.InvariantCulture);
- Headers[HeaderNames.ContentRange] = $"bytes {RangeStart}-{RangeEnd}/{TotalContentLength}";
+ private long RangeStart { get; set; }
+ private long RangeEnd { get; set; }
+ private long RangeLength { get; set; }
+ private long TotalContentLength { get; set; }
- if (RangeStart > 0 && SourceStream.CanSeek)
- {
- SourceStream.Position = RangeStart;
- }
- }
+ public Action OnComplete { get; set; }
/// <summary>
- /// The _requested ranges.
+ /// Additional HTTP Headers
/// </summary>
- private List<KeyValuePair<long, long?>> _requestedRanges;
+ /// <value>The headers.</value>
+ public IDictionary<string, string> Headers => _options;
+
/// <summary>
/// Gets the requested ranges.
/// </summary>
@@ -143,12 +93,12 @@ namespace Emby.Server.Implementations.HttpServer
if (!string.IsNullOrEmpty(vals[0]))
{
- start = long.Parse(vals[0], UsCulture);
+ start = long.Parse(vals[0], CultureInfo.InvariantCulture);
}
if (!string.IsNullOrEmpty(vals[1]))
{
- end = long.Parse(vals[1], UsCulture);
+ end = long.Parse(vals[1], CultureInfo.InvariantCulture);
}
_requestedRanges.Add(new KeyValuePair<long, long?>(start, end));
@@ -159,6 +109,51 @@ namespace Emby.Server.Implementations.HttpServer
}
}
+ public string ContentType { get; set; }
+
+ public IRequest RequestContext { get; set; }
+
+ public object Response { get; set; }
+
+ public int Status { get; set; }
+
+ public HttpStatusCode StatusCode
+ {
+ get => (HttpStatusCode)Status;
+ set => Status = (int)value;
+ }
+
+ /// <summary>
+ /// Sets the range values.
+ /// </summary>
+ private void SetRangeValues(long contentLength)
+ {
+ var requestedRange = RequestedRanges[0];
+
+ TotalContentLength = contentLength;
+
+ // If the requested range is "0-", we can optimize by just doing a stream copy
+ if (!requestedRange.Value.HasValue)
+ {
+ RangeEnd = TotalContentLength - 1;
+ }
+ else
+ {
+ RangeEnd = requestedRange.Value.Value;
+ }
+
+ RangeStart = requestedRange.Key;
+ RangeLength = 1 + RangeEnd - RangeStart;
+
+ Headers[HeaderNames.ContentLength] = RangeLength.ToString(CultureInfo.InvariantCulture);
+ Headers[HeaderNames.ContentRange] = $"bytes {RangeStart}-{RangeEnd}/{TotalContentLength}";
+
+ if (RangeStart > 0 && SourceStream.CanSeek)
+ {
+ SourceStream.Position = RangeStart;
+ }
+ }
+
public async Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken)
{
try
@@ -174,59 +169,44 @@ namespace Emby.Server.Implementations.HttpServer
// If the requested range is "0-", we can optimize by just doing a stream copy
if (RangeEnd >= TotalContentLength - 1)
{
- await source.CopyToAsync(responseStream, BufferSize).ConfigureAwait(false);
+ await source.CopyToAsync(responseStream, BufferSize, cancellationToken).ConfigureAwait(false);
}
else
{
- await CopyToInternalAsync(source, responseStream, RangeLength).ConfigureAwait(false);
+ await CopyToInternalAsync(source, responseStream, RangeLength, cancellationToken).ConfigureAwait(false);
}
}
}
finally
{
- if (OnComplete != null)
- {
- OnComplete();
- }
+ OnComplete?.Invoke();
}
}
- private static async Task CopyToInternalAsync(Stream source, Stream destination, long copyLength)
+ private static async Task CopyToInternalAsync(Stream source, Stream destination, long copyLength, CancellationToken cancellationToken)
{
- var array = new byte[BufferSize];
- int bytesRead;
- while ((bytesRead = await source.ReadAsync(array, 0, array.Length).ConfigureAwait(false)) != 0)
+ var array = ArrayPool<byte>.Shared.Rent(BufferSize);
+ try
{
- if (bytesRead == 0)
+ int bytesRead;
+ while ((bytesRead = await source.ReadAsync(array, 0, array.Length, cancellationToken).ConfigureAwait(false)) != 0)
{
- break;
- }
+ var bytesToCopy = Math.Min(bytesRead, copyLength);
- var bytesToCopy = Math.Min(bytesRead, copyLength);
+ await destination.WriteAsync(array, 0, Convert.ToInt32(bytesToCopy), cancellationToken).ConfigureAwait(false);
- await destination.WriteAsync(array, 0, Convert.ToInt32(bytesToCopy)).ConfigureAwait(false);
+ copyLength -= bytesToCopy;
- copyLength -= bytesToCopy;
-
- if (copyLength <= 0)
- {
- break;
+ if (copyLength <= 0)
+ {
+ break;
+ }
}
}
- }
-
- public string ContentType { get; set; }
-
- public IRequest RequestContext { get; set; }
-
- public object Response { get; set; }
-
- public int Status { get; set; }
-
- public HttpStatusCode StatusCode
- {
- get => (HttpStatusCode)Status;
- set => Status = (int)value;
+ finally
+ {
+ ArrayPool<byte>.Shared.Return(array);
+ }
}
}
}
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs
index 2e6ff65a6f..318bc6a248 100644
--- a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs
+++ b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs
@@ -51,6 +51,22 @@ namespace Emby.Server.Implementations.HttpServer.Security
return user;
}
+ public AuthorizationInfo Authenticate(HttpRequest request)
+ {
+ var auth = _authorizationContext.GetAuthorizationInfo(request);
+ if (auth?.User == null)
+ {
+ return null;
+ }
+
+ if (auth.User.HasPermission(PermissionKind.IsDisabled))
+ {
+ throw new SecurityException("User account has been disabled.");
+ }
+
+ return auth;
+ }
+
private User ValidateUser(IRequest request, IAuthenticationAttributes authAttribtues)
{
// This code is executed before the service
diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
index bbade00ff3..078ce0d8a8 100644
--- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
+++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs
@@ -8,6 +8,7 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Security;
using MediaBrowser.Model.Services;
+using Microsoft.AspNetCore.Http;
using Microsoft.Net.Http.Headers;
namespace Emby.Server.Implementations.HttpServer.Security
@@ -38,6 +39,14 @@ namespace Emby.Server.Implementations.HttpServer.Security
return GetAuthorization(requestContext);
}
+ public AuthorizationInfo GetAuthorizationInfo(HttpRequest requestContext)
+ {
+ var auth = GetAuthorizationDictionary(requestContext);
+ var (authInfo, _) =
+ GetAuthorizationInfoFromDictionary(auth, requestContext.Headers, requestContext.Query);
+ return authInfo;
+ }
+
/// <summary>
/// Gets the authorization.
/// </summary>
@@ -46,7 +55,23 @@ namespace Emby.Server.Implementations.HttpServer.Security
private AuthorizationInfo GetAuthorization(IRequest httpReq)
{
var auth = GetAuthorizationDictionary(httpReq);
+ var (authInfo, originalAuthInfo) =
+ GetAuthorizationInfoFromDictionary(auth, httpReq.Headers, httpReq.QueryString);
+
+ if (originalAuthInfo != null)
+ {
+ httpReq.Items["OriginalAuthenticationInfo"] = originalAuthInfo;
+ }
+
+ httpReq.Items["AuthorizationInfo"] = authInfo;
+ return authInfo;
+ }
+ private (AuthorizationInfo authInfo, AuthenticationInfo originalAuthenticationInfo) GetAuthorizationInfoFromDictionary(
+ in Dictionary<string, string> auth,
+ in IHeaderDictionary headers,
+ in IQueryCollection queryString)
+ {
string deviceId = null;
string device = null;
string client = null;
@@ -64,20 +89,20 @@ namespace Emby.Server.Implementations.HttpServer.Security
if (string.IsNullOrEmpty(token))
{
- token = httpReq.Headers["X-Emby-Token"];
+ token = headers["X-Emby-Token"];
}
if (string.IsNullOrEmpty(token))
{
- token = httpReq.Headers["X-MediaBrowser-Token"];
+ token = headers["X-MediaBrowser-Token"];
}
if (string.IsNullOrEmpty(token))
{
- token = httpReq.QueryString["api_key"];
+ token = queryString["api_key"];
}
- var info = new AuthorizationInfo
+ var authInfo = new AuthorizationInfo
{
Client = client,
Device = device,
@@ -86,6 +111,7 @@ namespace Emby.Server.Implementations.HttpServer.Security
Token = token
};
+ AuthenticationInfo originalAuthenticationInfo = null;
if (!string.IsNullOrWhiteSpace(token))
{
var result = _authRepo.Get(new AuthenticationInfoQuery
@@ -93,81 +119,77 @@ namespace Emby.Server.Implementations.HttpServer.Security
AccessToken = token
});
- var tokenInfo = result.Items.Count > 0 ? result.Items[0] : null;
+ originalAuthenticationInfo = result.Items.Count > 0 ? result.Items[0] : null;
- if (tokenInfo != null)
+ if (originalAuthenticationInfo != null)
{
var updateToken = false;
// TODO: Remove these checks for IsNullOrWhiteSpace
- if (string.IsNullOrWhiteSpace(info.Client))
+ if (string.IsNullOrWhiteSpace(authInfo.Client))
{
- info.Client = tokenInfo.AppName;
+ authInfo.Client = originalAuthenticationInfo.AppName;
}
- if (string.IsNullOrWhiteSpace(info.DeviceId))
+ if (string.IsNullOrWhiteSpace(authInfo.DeviceId))
{
- info.DeviceId = tokenInfo.DeviceId;
+ authInfo.DeviceId = originalAuthenticationInfo.DeviceId;
}
// Temporary. TODO - allow clients to specify that the token has been shared with a casting device
- var allowTokenInfoUpdate = info.Client == null || info.Client.IndexOf("chromecast", StringComparison.OrdinalIgnoreCase) == -1;
+ var allowTokenInfoUpdate = authInfo.Client == null || authInfo.Client.IndexOf("chromecast", StringComparison.OrdinalIgnoreCase) == -1;
- if (string.IsNullOrWhiteSpace(info.Device))
+ if (string.IsNullOrWhiteSpace(authInfo.Device))
{
- info.Device = tokenInfo.DeviceName;
+ authInfo.Device = originalAuthenticationInfo.DeviceName;
}
- else if (!string.Equals(info.Device, tokenInfo.DeviceName, StringComparison.OrdinalIgnoreCase))
+ else if (!string.Equals(authInfo.Device, originalAuthenticationInfo.DeviceName, StringComparison.OrdinalIgnoreCase))
{
if (allowTokenInfoUpdate)
{
updateToken = true;
- tokenInfo.DeviceName = info.Device;
+ originalAuthenticationInfo.DeviceName = authInfo.Device;
}
}
- if (string.IsNullOrWhiteSpace(info.Version))
+ if (string.IsNullOrWhiteSpace(authInfo.Version))
{
- info.Version = tokenInfo.AppVersion;
+ authInfo.Version = originalAuthenticationInfo.AppVersion;
}
- else if (!string.Equals(info.Version, tokenInfo.AppVersion, StringComparison.OrdinalIgnoreCase))
+ else if (!string.Equals(authInfo.Version, originalAuthenticationInfo.AppVersion, StringComparison.OrdinalIgnoreCase))
{
if (allowTokenInfoUpdate)
{
updateToken = true;
- tokenInfo.AppVersion = info.Version;
+ originalAuthenticationInfo.AppVersion = authInfo.Version;
}
}
- if ((DateTime.UtcNow - tokenInfo.DateLastActivity).TotalMinutes > 3)
+ if ((DateTime.UtcNow - originalAuthenticationInfo.DateLastActivity).TotalMinutes > 3)
{
- tokenInfo.DateLastActivity = DateTime.UtcNow;
+ originalAuthenticationInfo.DateLastActivity = DateTime.UtcNow;
updateToken = true;
}
- if (!tokenInfo.UserId.Equals(Guid.Empty))
+ if (!originalAuthenticationInfo.UserId.Equals(Guid.Empty))
{
- info.User = _userManager.GetUserById(tokenInfo.UserId);
+ authInfo.User = _userManager.GetUserById(originalAuthenticationInfo.UserId);
- if (info.User != null && !string.Equals(info.User.Username, tokenInfo.UserName, StringComparison.OrdinalIgnoreCase))
+ if (authInfo.User != null && !string.Equals(authInfo.User.Username, originalAuthenticationInfo.UserName, StringComparison.OrdinalIgnoreCase))
{
- tokenInfo.UserName = info.User.Username;
+ originalAuthenticationInfo.UserName = authInfo.User.Username;
updateToken = true;
}
}
if (updateToken)
{
- _authRepo.Update(tokenInfo);
+ _authRepo.Update(originalAuthenticationInfo);
}
}
-
- httpReq.Items["OriginalAuthenticationInfo"] = tokenInfo;
}
- httpReq.Items["AuthorizationInfo"] = info;
-
- return info;
+ return (authInfo, originalAuthenticationInfo);
}
/// <summary>
@@ -188,6 +210,23 @@ namespace Emby.Server.Implementations.HttpServer.Security
}
/// <summary>
+ /// Gets the auth.
+ /// </summary>
+ /// <param name="httpReq">The HTTP req.</param>
+ /// <returns>Dictionary{System.StringSystem.String}.</returns>
+ private Dictionary<string, string> GetAuthorizationDictionary(HttpRequest httpReq)
+ {
+ var auth = httpReq.Headers["X-Emby-Authorization"];
+
+ if (string.IsNullOrEmpty(auth))
+ {
+ auth = httpReq.Headers[HeaderNames.Authorization];
+ }
+
+ return GetAuthorization(auth);
+ }
+
+ /// <summary>
/// Gets the authorization.
/// </summary>
/// <param name="authorizationHeader">The authorization header.</param>
diff --git a/Emby.Server.Implementations/IStartupOptions.cs b/Emby.Server.Implementations/IStartupOptions.cs
index 0b9f805389..e7e72c686b 100644
--- a/Emby.Server.Implementations/IStartupOptions.cs
+++ b/Emby.Server.Implementations/IStartupOptions.cs
@@ -37,11 +37,6 @@ namespace Emby.Server.Implementations
string RestartArgs { get; }
/// <summary>
- /// Gets the value of the --plugin-manifest-url command line option.
- /// </summary>
- string PluginManifestUrl { get; }
-
- /// <summary>
/// Gets the value of the --published-server-url command line option.
/// </summary>
Uri PublishedServerUrl { get; }
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index edb58e9102..6a20a015ad 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -2897,7 +2897,8 @@ namespace Emby.Server.Implementations.Library
}
catch (HttpException ex)
{
- if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound)
+ if (ex.StatusCode.HasValue
+ && (ex.StatusCode.Value == HttpStatusCode.NotFound || ex.StatusCode.Value == HttpStatusCode.Forbidden))
{
continue;
}
diff --git a/Emby.Server.Implementations/Localization/Core/es_419.json b/Emby.Server.Implementations/Localization/Core/es_419.json
index b0fdc8386c..0959ef2ca0 100644
--- a/Emby.Server.Implementations/Localization/Core/es_419.json
+++ b/Emby.Server.Implementations/Localization/Core/es_419.json
@@ -1,5 +1,5 @@
{
- "LabelRunningTimeValue": "Duración: {0}",
+ "LabelRunningTimeValue": "Tiempo en ejecución: {0}",
"ValueSpecialEpisodeName": "Especial - {0}",
"Sync": "Sincronizar",
"Songs": "Canciones",
diff --git a/Emby.Server.Implementations/Localization/Core/ne.json b/Emby.Server.Implementations/Localization/Core/ne.json
new file mode 100644
index 0000000000..73fae3931e
--- /dev/null
+++ b/Emby.Server.Implementations/Localization/Core/ne.json
@@ -0,0 +1,62 @@
+{
+ "NotificationOptionUserLockedOut": "प्रयोगकर्ता प्रतिबन्धित",
+ "NotificationOptionTaskFailed": "निर्धारित कार्य विफलता",
+ "NotificationOptionServerRestartRequired": "सर्भर रिस्टार्ट आवाश्यक छ",
+ "NotificationOptionPluginUpdateInstalled": "प्लगइन अद्यावधिक स्थापना भयो",
+ "NotificationOptionPluginUninstalled": "प्लगइन विस्थापित",
+ "NotificationOptionPluginInstalled": "प्लगइन स्थापना भयो",
+ "NotificationOptionPluginError": "प्लगइन असफलता",
+ "NotificationOptionNewLibraryContent": "नयाँ सामग्री थपियो",
+ "NotificationOptionInstallationFailed": "स्थापना असफलता",
+ "NotificationOptionCameraImageUploaded": "क्यामेरा फोटो अपलोड गरियो",
+ "NotificationOptionAudioPlaybackStopped": "ध्वनि प्रक्षेपण रोकियो",
+ "NotificationOptionAudioPlayback": "ध्वनि प्रक्षेपण शुरू भयो",
+ "NotificationOptionApplicationUpdateInstalled": "अनुप्रयोग अद्यावधिक स्थापना भयो",
+ "NotificationOptionApplicationUpdateAvailable": "अनुप्रयोग अपडेट उपलब्ध छ",
+ "NewVersionIsAvailable": "जेलीफिन सर्भर को नयाँ संस्करण डाउनलोड को लागी उपलब्ध छ।",
+ "NameSeasonUnknown": "अज्ञात श्रृंखला",
+ "NameSeasonNumber": "श्रृंखला {0}",
+ "NameInstallFailed": "{0} स्थापना असफल भयो",
+ "MusicVideos": "सांगीतिक भिडियोहरू",
+ "Music": "संगीत",
+ "Movies": "चलचित्रहरू",
+ "MixedContent": "मिश्रित सामग्री",
+ "MessageServerConfigurationUpdated": "सर्भर कन्फिगरेसन अद्यावधिक गरिएको छ",
+ "MessageNamedServerConfigurationUpdatedWithValue": "सर्भर कन्फिगरेसन विभाग {0} अद्यावधिक गरिएको छ",
+ "MessageApplicationUpdatedTo": "जेलीफिन सर्भर {0} मा अद्यावधिक गरिएको छ",
+ "MessageApplicationUpdated": "जेलीफिन सर्भर अपडेट गरिएको छ",
+ "Latest": "नविनतम",
+ "LabelRunningTimeValue": "कुल समय: {0}",
+ "LabelIpAddressValue": "आईपी ठेगाना: {0}",
+ "ItemRemovedWithName": "{0}लाई पुस्तकालयबाट हटाईयो",
+ "ItemAddedWithName": "{0} लाईब्रेरीमा थपियो",
+ "Inherit": "इनहेरिट",
+ "HomeVideos": "घरेलु भिडियोहरू",
+ "HeaderRecordingGroups": "रेकर्ड समूहहरू",
+ "HeaderNextUp": "आगामी",
+ "HeaderLiveTV": "प्रत्यक्ष टिभी",
+ "HeaderFavoriteSongs": "मनपर्ने गीतहरू",
+ "HeaderFavoriteShows": "मनपर्ने कार्यक्रमहरू",
+ "HeaderFavoriteEpisodes": "मनपर्ने एपिसोडहरू",
+ "HeaderFavoriteArtists": "मनपर्ने कलाकारहरू",
+ "HeaderFavoriteAlbums": "मनपर्ने एल्बमहरू",
+ "HeaderContinueWatching": "हेर्न जारी राख्नुहोस्",
+ "HeaderCameraUploads": "क्यामेरा अपलोडहरू",
+ "HeaderAlbumArtists": "एल्बमका कलाकारहरू",
+ "Genres": "विधाहरू",
+ "Folders": "फोल्डरहरू",
+ "Favorites": "मनपर्ने",
+ "FailedLoginAttemptWithUserName": "{0}को लग इन प्रयास असफल",
+ "DeviceOnlineWithName": "{0}को साथ जडित",
+ "DeviceOfflineWithName": "{0}बाट विच्छेदन भयो",
+ "Collections": "संग्रह",
+ "ChapterNameValue": "अध्याय {0}",
+ "Channels": "च्यानलहरू",
+ "AppDeviceValues": "अनुप्रयोग: {0}, उपकरण: {1}",
+ "AuthenticationSucceededWithUserName": "{0} सफलतापूर्वक प्रमाणीकरण गरियो",
+ "CameraImageUploadedFrom": "{0}बाट नयाँ क्यामेरा छवि अपलोड गरिएको छ",
+ "Books": "पुस्तकहरु",
+ "Artists": "कलाकारहरू",
+ "Application": "अनुप्रयोगहरू",
+ "Albums": "एल्बमहरू"
+}
diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs
index d12b5a9371..6aa1dfbc9b 100644
--- a/Emby.Server.Implementations/Networking/NetworkManager.cs
+++ b/Emby.Server.Implementations/Networking/NetworkManager.cs
@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
-using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
@@ -13,6 +12,9 @@ using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Networking
{
+ /// <summary>
+ /// Class to take care of network interface management.
+ /// </summary>
public class NetworkManager : INetworkManager
{
private readonly ILogger<NetworkManager> _logger;
@@ -21,8 +23,14 @@ namespace Emby.Server.Implementations.Networking
private readonly object _localIpAddressSyncLock = new object();
private readonly object _subnetLookupLock = new object();
- private Dictionary<string, List<string>> _subnetLookup = new Dictionary<string, List<string>>(StringComparer.Ordinal);
+ private readonly Dictionary<string, List<string>> _subnetLookup = new Dictionary<string, List<string>>(StringComparer.Ordinal);
+ private List<PhysicalAddress> _macAddresses;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NetworkManager"/> class.
+ /// </summary>
+ /// <param name="logger">Logger to use for messages.</param>
public NetworkManager(ILogger<NetworkManager> logger)
{
_logger = logger;
@@ -31,8 +39,10 @@ namespace Emby.Server.Implementations.Networking
NetworkChange.NetworkAvailabilityChanged += OnNetworkAvailabilityChanged;
}
+ /// <inheritdoc/>
public event EventHandler NetworkChanged;
+ /// <inheritdoc/>
public Func<string[]> LocalSubnetsFn { get; set; }
private void OnNetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
@@ -58,13 +68,14 @@ namespace Emby.Server.Implementations.Networking
NetworkChanged?.Invoke(this, EventArgs.Empty);
}
- public IPAddress[] GetLocalIpAddresses(bool ignoreVirtualInterface = true)
+ /// <inheritdoc/>
+ public IPAddress[] GetLocalIpAddresses()
{
lock (_localIpAddressSyncLock)
{
if (_localIpAddresses == null)
{
- var addresses = GetLocalIpAddressesInternal(ignoreVirtualInterface).ToArray();
+ var addresses = GetLocalIpAddressesInternal().ToArray();
_localIpAddresses = addresses;
}
@@ -73,42 +84,47 @@ namespace Emby.Server.Implementations.Networking
}
}
- private List<IPAddress> GetLocalIpAddressesInternal(bool ignoreVirtualInterface)
+ private List<IPAddress> GetLocalIpAddressesInternal()
{
- var list = GetIPsDefault(ignoreVirtualInterface).ToList();
+ var list = GetIPsDefault().ToList();
if (list.Count == 0)
{
list = GetLocalIpAddressesFallback().GetAwaiter().GetResult().ToList();
}
- var listClone = list.ToList();
+ var listClone = new List<IPAddress>();
- return list
- .OrderBy(i => i.AddressFamily == AddressFamily.InterNetwork ? 0 : 1)
- .ThenBy(i => listClone.IndexOf(i))
- .Where(FilterIpAddress)
- .GroupBy(i => i.ToString())
- .Select(x => x.First())
- .ToList();
- }
+ var subnets = LocalSubnetsFn();
- private static bool FilterIpAddress(IPAddress address)
- {
- if (address.IsIPv6LinkLocal
- || address.ToString().StartsWith("169.", StringComparison.OrdinalIgnoreCase))
+ foreach (var i in list)
{
- return false;
+ if (i.IsIPv6LinkLocal || i.ToString().StartsWith("169.254.", StringComparison.OrdinalIgnoreCase))
+ {
+ continue;
+ }
+
+ if (Array.IndexOf(subnets, $"[{i}]") == -1)
+ {
+ listClone.Add(i);
+ }
}
- return true;
+ return listClone
+ .OrderBy(i => i.AddressFamily == AddressFamily.InterNetwork ? 0 : 1)
+ // .ThenBy(i => listClone.IndexOf(i))
+ .GroupBy(i => i.ToString())
+ .Select(x => x.First())
+ .ToList();
}
+ /// <inheritdoc/>
public bool IsInPrivateAddressSpace(string endpoint)
{
return IsInPrivateAddressSpace(endpoint, true);
}
+ // Checks if the address in endpoint is an RFC1918, RFC1122, or RFC3927 address
private bool IsInPrivateAddressSpace(string endpoint, bool checkSubnets)
{
if (string.Equals(endpoint, "::1", StringComparison.OrdinalIgnoreCase))
@@ -116,12 +132,12 @@ namespace Emby.Server.Implementations.Networking
return true;
}
- // ipv6
+ // IPV6
if (endpoint.Split('.').Length > 4)
{
// Handle ipv4 mapped to ipv6
var originalEndpoint = endpoint;
- endpoint = endpoint.Replace("::ffff:", string.Empty);
+ endpoint = endpoint.Replace("::ffff:", string.Empty, StringComparison.OrdinalIgnoreCase);
if (string.Equals(endpoint, originalEndpoint, StringComparison.OrdinalIgnoreCase))
{
@@ -130,23 +146,21 @@ namespace Emby.Server.Implementations.Networking
}
// Private address space:
- // http://en.wikipedia.org/wiki/Private_network
-
- if (endpoint.StartsWith("172.", StringComparison.OrdinalIgnoreCase))
- {
- return Is172AddressPrivate(endpoint);
- }
- if (endpoint.StartsWith("localhost", StringComparison.OrdinalIgnoreCase) ||
- endpoint.StartsWith("127.", StringComparison.OrdinalIgnoreCase) ||
- endpoint.StartsWith("169.", StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(endpoint, "localhost", StringComparison.OrdinalIgnoreCase))
{
return true;
}
- if (checkSubnets && endpoint.StartsWith("192.168", StringComparison.OrdinalIgnoreCase))
+ byte[] octet = IPAddress.Parse(endpoint).GetAddressBytes();
+
+ if ((octet[0] == 10) ||
+ (octet[0] == 172 && (octet[1] >= 16 && octet[1] <= 31)) || // RFC1918
+ (octet[0] == 192 && octet[1] == 168) || // RFC1918
+ (octet[0] == 127) || // RFC1122
+ (octet[0] == 169 && octet[1] == 254)) // RFC3927
{
- return true;
+ return false;
}
if (checkSubnets && IsInPrivateAddressSpaceAndLocalSubnet(endpoint))
@@ -157,6 +171,7 @@ namespace Emby.Server.Implementations.Networking
return false;
}
+ /// <inheritdoc/>
public bool IsInPrivateAddressSpaceAndLocalSubnet(string endpoint)
{
if (endpoint.StartsWith("10.", StringComparison.OrdinalIgnoreCase))
@@ -179,6 +194,7 @@ namespace Emby.Server.Implementations.Networking
return false;
}
+ // Gives a list of possible subnets from the system whose interface ip starts with endpointFirstPart
private List<string> GetSubnets(string endpointFirstPart)
{
lock (_subnetLookupLock)
@@ -224,46 +240,75 @@ namespace Emby.Server.Implementations.Networking
}
}
- private static bool Is172AddressPrivate(string endpoint)
- {
- for (var i = 16; i <= 31; i++)
- {
- if (endpoint.StartsWith("172." + i.ToString(CultureInfo.InvariantCulture) + ".", StringComparison.OrdinalIgnoreCase))
- {
- return true;
- }
- }
-
- return false;
- }
-
+ /// <inheritdoc/>
public bool IsInLocalNetwork(string endpoint)
{
return IsInLocalNetworkInternal(endpoint, true);
}
+ /// <inheritdoc/>
public bool IsAddressInSubnets(string addressString, string[] subnets)
{
return IsAddressInSubnets(IPAddress.Parse(addressString), addressString, subnets);
}
+ /// <inheritdoc/>
+ public bool IsAddressInSubnets(IPAddress address, bool excludeInterfaces, bool excludeRFC)
+ {
+ byte[] octet = address.GetAddressBytes();
+
+ if ((octet[0] == 127) || // RFC1122
+ (octet[0] == 169 && octet[1] == 254)) // RFC3927
+ {
+ // don't use on loopback or 169 interfaces
+ return false;
+ }
+
+ string addressString = address.ToString();
+ string excludeAddress = "[" + addressString + "]";
+ var subnets = LocalSubnetsFn();
+
+ // Exclude any addresses if they appear in the LAN list in [ ]
+ if (Array.IndexOf(subnets, excludeAddress) != -1)
+ {
+ return false;
+ }
+
+ return IsAddressInSubnets(address, addressString, subnets);
+ }
+
+ /// <summary>
+ /// Checks if the give address falls within the ranges given in [subnets]. The addresses in subnets can be hosts or subnets in the CIDR format.
+ /// </summary>
+ /// <param name="address">IPAddress version of the address.</param>
+ /// <param name="addressString">The address to check.</param>
+ /// <param name="subnets">If true, check against addresses in the LAN settings which have [] arroud and return true if it matches the address give in address.</param>
+ /// <returns><c>false</c>if the address isn't in the subnets, <c>true</c> otherwise.</returns>
private static bool IsAddressInSubnets(IPAddress address, string addressString, string[] subnets)
{
foreach (var subnet in subnets)
{
var normalizedSubnet = subnet.Trim();
-
+ // Is the subnet a host address and does it match the address being passes?
if (string.Equals(normalizedSubnet, addressString, StringComparison.OrdinalIgnoreCase))
{
return true;
}
+ // Parse CIDR subnets and see if address falls within it.
if (normalizedSubnet.Contains('/', StringComparison.Ordinal))
{
- var ipNetwork = IPNetwork.Parse(normalizedSubnet);
- if (ipNetwork.Contains(address))
+ try
{
- return true;
+ var ipNetwork = IPNetwork.Parse(normalizedSubnet);
+ if (ipNetwork.Contains(address))
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Ignoring - invalid subnet passed encountered.
}
}
}
@@ -288,7 +333,7 @@ namespace Emby.Server.Implementations.Networking
var localSubnets = localSubnetsFn();
foreach (var subnet in localSubnets)
{
- // only validate if there's at least one valid entry
+ // Only validate if there's at least one valid entry.
if (!string.IsNullOrWhiteSpace(subnet))
{
return IsAddressInSubnets(address, addressString, localSubnets) || IsInPrivateAddressSpace(addressString, false);
@@ -345,7 +390,7 @@ namespace Emby.Server.Implementations.Networking
}
catch (InvalidOperationException)
{
- // Can happen with reverse proxy or IIS url rewriting
+ // Can happen with reverse proxy or IIS url rewriting?
}
catch (Exception ex)
{
@@ -362,7 +407,7 @@ namespace Emby.Server.Implementations.Networking
return Dns.GetHostAddressesAsync(hostName);
}
- private IEnumerable<IPAddress> GetIPsDefault(bool ignoreVirtualInterface)
+ private IEnumerable<IPAddress> GetIPsDefault()
{
IEnumerable<NetworkInterface> interfaces;
@@ -382,15 +427,7 @@ namespace Emby.Server.Implementations.Networking
{
var ipProperties = network.GetIPProperties();
- // Try to exclude virtual adapters
- // http://stackoverflow.com/questions/8089685/c-sharp-finding-my-machines-local-ip-address-and-not-the-vms
- var addr = ipProperties.GatewayAddresses.FirstOrDefault();
- if (addr == null
- || (ignoreVirtualInterface
- && (addr.Address.Equals(IPAddress.Any) || addr.Address.Equals(IPAddress.IPv6Any))))
- {
- return Enumerable.Empty<IPAddress>();
- }
+ // Exclude any addresses if they appear in the LAN list in [ ]
return ipProperties.UnicastAddresses
.Select(i => i.Address)
@@ -423,33 +460,29 @@ namespace Emby.Server.Implementations.Networking
return port;
}
+ /// <inheritdoc/>
public int GetRandomUnusedUdpPort()
{
var localEndPoint = new IPEndPoint(IPAddress.Any, 0);
using (var udpClient = new UdpClient(localEndPoint))
{
- var port = ((IPEndPoint)udpClient.Client.LocalEndPoint).Port;
- return port;
+ return ((IPEndPoint)udpClient.Client.LocalEndPoint).Port;
}
}
- private List<PhysicalAddress> _macAddresses;
+ /// <inheritdoc/>
public List<PhysicalAddress> GetMacAddresses()
{
- if (_macAddresses == null)
- {
- _macAddresses = GetMacAddressesInternal().ToList();
- }
-
- return _macAddresses;
+ return _macAddresses ??= GetMacAddressesInternal().ToList();
}
private static IEnumerable<PhysicalAddress> GetMacAddressesInternal()
=> NetworkInterface.GetAllNetworkInterfaces()
.Where(i => i.NetworkInterfaceType != NetworkInterfaceType.Loopback)
.Select(x => x.GetPhysicalAddress())
- .Where(x => x != null && x != PhysicalAddress.None);
+ .Where(x => !x.Equals(PhysicalAddress.None));
+ /// <inheritdoc/>
public bool IsInSameSubnet(IPAddress address1, IPAddress address2, IPAddress subnetMask)
{
IPAddress network1 = GetNetworkAddress(address1, subnetMask);
@@ -476,6 +509,7 @@ namespace Emby.Server.Implementations.Networking
return new IPAddress(broadcastAddress);
}
+ /// <inheritdoc/>
public IPAddress GetLocalIpSubnetMask(IPAddress address)
{
NetworkInterface[] interfaces;
@@ -496,14 +530,11 @@ namespace Emby.Server.Implementations.Networking
foreach (NetworkInterface ni in interfaces)
{
- if (ni.GetIPProperties().GatewayAddresses.FirstOrDefault() != null)
+ foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)
{
- foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)
+ if (ip.Address.Equals(address) && ip.IPv4Mask != null)
{
- if (ip.Address.Equals(address) && ip.IPv4Mask != null)
- {
- return ip.IPv4Mask;
- }
+ return ip.IPv4Mask;
}
}
}
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index 80326fddf2..146ebaf25b 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -1,7 +1,6 @@
#pragma warning disable CS1591
using System;
-using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
@@ -17,11 +16,10 @@ using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Updates;
using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Model.Events;
using MediaBrowser.Model.IO;
+using MediaBrowser.Model.Net;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Updates;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Updates
@@ -32,11 +30,6 @@ namespace Emby.Server.Implementations.Updates
public class InstallationManager : IInstallationManager
{
/// <summary>
- /// The key for a setting that specifies a URL for the plugin repository JSON manifest.
- /// </summary>
- public const string PluginManifestUrlKey = "InstallationManager:PluginManifestUrl";
-
- /// <summary>
/// The logger.
/// </summary>
private readonly ILogger<InstallationManager> _logger;
@@ -53,7 +46,6 @@ namespace Emby.Server.Implementations.Updates
private readonly IApplicationHost _applicationHost;
private readonly IZipClient _zipClient;
- private readonly IConfiguration _appConfig;
private readonly object _currentInstallationsLock = new object();
@@ -75,8 +67,7 @@ namespace Emby.Server.Implementations.Updates
IJsonSerializer jsonSerializer,
IServerConfigurationManager config,
IFileSystem fileSystem,
- IZipClient zipClient,
- IConfiguration appConfig)
+ IZipClient zipClient)
{
if (logger == null)
{
@@ -94,7 +85,6 @@ namespace Emby.Server.Implementations.Updates
_config = config;
_fileSystem = fileSystem;
_zipClient = zipClient;
- _appConfig = appConfig;
}
/// <inheritdoc />
@@ -122,16 +112,14 @@ namespace Emby.Server.Implementations.Updates
public IEnumerable<InstallationInfo> CompletedInstallations => _completedInstallationsInternal;
/// <inheritdoc />
- public async Task<IReadOnlyList<PackageInfo>> GetAvailablePackages(CancellationToken cancellationToken = default)
+ public async Task<IReadOnlyList<PackageInfo>> GetPackages(string manifest, CancellationToken cancellationToken = default)
{
- var manifestUrl = _appConfig.GetValue<string>(PluginManifestUrlKey);
-
try
{
using (var response = await _httpClient.SendAsync(
new HttpRequestOptions
{
- Url = manifestUrl,
+ Url = manifest,
CancellationToken = cancellationToken,
CacheMode = CacheMode.Unconditional,
CacheLength = TimeSpan.FromMinutes(3)
@@ -145,23 +133,33 @@ namespace Emby.Server.Implementations.Updates
}
catch (SerializationException ex)
{
- const string LogTemplate =
- "Failed to deserialize the plugin manifest retrieved from {PluginManifestUrl}. If you " +
- "have specified a custom plugin repository manifest URL with --plugin-manifest-url or " +
- PluginManifestUrlKey + ", please ensure that it is correct.";
- _logger.LogError(ex, LogTemplate, manifestUrl);
- throw;
+ _logger.LogError(ex, "Failed to deserialize the plugin manifest retrieved from {Manifest}", manifest);
+ return Array.Empty<PackageInfo>();
}
}
}
catch (UriFormatException ex)
{
- const string LogTemplate =
- "The URL configured for the plugin repository manifest URL is not valid: {PluginManifestUrl}. " +
- "Please check the URL configured by --plugin-manifest-url or " + PluginManifestUrlKey;
- _logger.LogError(ex, LogTemplate, manifestUrl);
- throw;
+ _logger.LogError(ex, "The URL configured for the plugin repository manifest URL is not valid: {Manifest}", manifest);
+ return Array.Empty<PackageInfo>();
+ }
+ catch (HttpException ex)
+ {
+ _logger.LogError(ex, "An error occurred while accessing the plugin manifest: {Manifest}", manifest);
+ return Array.Empty<PackageInfo>();
+ }
+ }
+
+ /// <inheritdoc />
+ public async Task<IReadOnlyList<PackageInfo>> GetAvailablePackages(CancellationToken cancellationToken = default)
+ {
+ var result = new List<PackageInfo>();
+ foreach (RepositoryInfo repository in _config.Configuration.PluginRepositories)
+ {
+ result.AddRange(await GetPackages(repository.Url, cancellationToken).ConfigureAwait(true));
}
+
+ return result;
}
/// <inheritdoc />
@@ -402,6 +400,12 @@ namespace Emby.Server.Implementations.Updates
/// <param name="plugin">The plugin.</param>
public void UninstallPlugin(IPlugin plugin)
{
+ if (!plugin.CanUninstall)
+ {
+ _logger.LogWarning("Attempt to delete non removable plugin {0}, ignoring request", plugin.Name);
+ return;
+ }
+
plugin.OnUninstalling();
// Remove it the quick way for now