mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
update to jquery mobile 1.4.3
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
@@ -30,13 +31,18 @@ namespace MediaBrowser.Server.Implementations.Notifications
|
||||
_logger = logManager.GetLogger(GetType().Name);
|
||||
}
|
||||
|
||||
private NotificationOptions GetConfiguration()
|
||||
{
|
||||
return _config.GetConfiguration<NotificationOptions>("notifications");
|
||||
}
|
||||
|
||||
public Task SendNotification(NotificationRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var notificationType = request.NotificationType;
|
||||
|
||||
var options = string.IsNullOrWhiteSpace(notificationType) ?
|
||||
null :
|
||||
_config.Configuration.NotificationOptions.GetOptions(notificationType);
|
||||
GetConfiguration().GetOptions(notificationType);
|
||||
|
||||
var users = GetUserIds(request, options)
|
||||
.Except(request.ExcludeUserIds)
|
||||
@@ -223,7 +229,7 @@ namespace MediaBrowser.Server.Implementations.Notifications
|
||||
private bool IsEnabled(INotificationService service, string notificationType)
|
||||
{
|
||||
return string.IsNullOrEmpty(notificationType) ||
|
||||
_config.Configuration.NotificationOptions.IsServiceEnabled(service.Name, notificationType);
|
||||
GetConfiguration().IsServiceEnabled(service.Name, notificationType);
|
||||
}
|
||||
|
||||
public void AddParts(IEnumerable<INotificationService> services, IEnumerable<INotificationTypeFactory> notificationTypeFactories)
|
||||
@@ -248,9 +254,11 @@ namespace MediaBrowser.Server.Implementations.Notifications
|
||||
|
||||
}).SelectMany(i => i).ToList();
|
||||
|
||||
var config = GetConfiguration();
|
||||
|
||||
foreach (var i in list)
|
||||
{
|
||||
i.Enabled = _config.Configuration.NotificationOptions.IsEnabled(i.Type);
|
||||
i.Enabled = config.IsEnabled(i.Type);
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user