aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-11-03 19:59:50 -0400
committerGitHub <noreply@github.com>2016-11-03 19:59:50 -0400
commitc53745548ac2130f4cfbbe0d7a2804c36c8ae4eb (patch)
tree6ee298ebb5470c4f3bcbef8d814a0354901469c4 /MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs
parent338b04a0c58729ec70aed89924ea6bd12422872b (diff)
parent405a5f69c5967b4d919b5fe91396f12cb83e8aa8 (diff)
Merge pull request #2267 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs61
1 files changed, 0 insertions, 61 deletions
diff --git a/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs b/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs
deleted file mode 100644
index 4a625f0fb..000000000
--- a/MediaBrowser.Server.Implementations/Notifications/InternalNotificationService.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using MediaBrowser.Controller.Entities;
-using MediaBrowser.Controller.Notifications;
-using MediaBrowser.Model.Notifications;
-using System.Threading;
-using System.Threading.Tasks;
-using System;
-
-namespace MediaBrowser.Server.Implementations.Notifications
-{
- public class InternalNotificationService : INotificationService, IConfigurableNotificationService
- {
- private readonly INotificationsRepository _repo;
-
- public InternalNotificationService(INotificationsRepository repo)
- {
- _repo = repo;
- }
-
- public string Name
- {
- get { return "Dashboard Notifications"; }
- }
-
- public Task SendNotification(UserNotification request, CancellationToken cancellationToken)
- {
- return _repo.AddNotification(new Notification
- {
- Date = request.Date,
- Description = request.Description,
- Level = request.Level,
- Name = request.Name,
- Url = request.Url,
- UserId = request.User.Id.ToString("N")
-
- }, cancellationToken);
- }
-
- public bool IsEnabledForUser(User user)
- {
- return user.Policy.IsAdministrator;
- }
-
- public bool IsHidden
- {
- get { return true; }
- }
-
- public bool IsEnabled(string notificationType)
- {
- if (notificationType.IndexOf("playback", StringComparison.OrdinalIgnoreCase) != -1)
- {
- return false;
- }
- if (notificationType.IndexOf("newlibrarycontent", StringComparison.OrdinalIgnoreCase) != -1)
- {
- return false;
- }
- return true;
- }
- }
-}