mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
Merge branch 'master' into userdb-efcore
# Conflicts: # Emby.Server.Implementations/Data/SqliteUserDataRepository.cs # Emby.Server.Implementations/Library/UserManager.cs # Jellyfin.Data/Entities/User.cs # Jellyfin.Data/ISavingChanges.cs # Jellyfin.Server.Implementations/Jellyfin.Server.Implementations.csproj # Jellyfin.Server.Implementations/JellyfinDb.cs # Jellyfin.Server/Migrations/MigrationRunner.cs # MediaBrowser.Model/Notifications/NotificationOptions.cs # MediaBrowser.sln
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.Users;
|
||||
|
||||
namespace MediaBrowser.Model.Notifications
|
||||
@@ -82,8 +83,12 @@ namespace MediaBrowser.Model.Notifications
|
||||
{
|
||||
foreach (NotificationOption i in Options)
|
||||
{
|
||||
if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase)) return i;
|
||||
if (string.Equals(type, i.Type, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -99,7 +104,7 @@ namespace MediaBrowser.Model.Notifications
|
||||
NotificationOption opt = GetOptions(notificationType);
|
||||
|
||||
return opt == null ||
|
||||
!ListHelper.ContainsIgnoreCase(opt.DisabledServices, service);
|
||||
!opt.DisabledServices.Contains(service, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public bool IsEnabledToMonitorUser(string type, Guid userId)
|
||||
@@ -107,7 +112,7 @@ namespace MediaBrowser.Model.Notifications
|
||||
NotificationOption opt = GetOptions(type);
|
||||
|
||||
return opt != null && opt.Enabled &&
|
||||
!ListHelper.ContainsIgnoreCase(opt.DisabledMonitorUsers, userId.ToString(""));
|
||||
!opt.DisabledMonitorUsers.Contains(userId.ToString(""), StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public bool IsEnabledToSendToUser(string type, string userId, Jellyfin.Data.Entities.User user)
|
||||
@@ -126,7 +131,7 @@ namespace MediaBrowser.Model.Notifications
|
||||
return true;
|
||||
}
|
||||
|
||||
return ListHelper.ContainsIgnoreCase(opt.SendToUsers, userId);
|
||||
return opt.SendToUsers.Contains(userId, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user