mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-05 09:52:10 +01:00
add new notification options
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.ScheduledTasks;
|
||||
using MediaBrowser.Common.Updates;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Notifications;
|
||||
@@ -27,6 +28,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||
private readonly ITaskManager _taskManager;
|
||||
private readonly INotificationManager _notificationManager;
|
||||
|
||||
private IServerConfigurationManager _config;
|
||||
|
||||
public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager)
|
||||
{
|
||||
_installationManager = installationManager;
|
||||
@@ -75,7 +78,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||
{
|
||||
var result = e.Argument;
|
||||
|
||||
if (result.Status == TaskCompletionStatus.Failed)
|
||||
if (result.Status == TaskCompletionStatus.Failed &&
|
||||
_config.Configuration.NotificationOptions.SendOnFailedTasks)
|
||||
{
|
||||
var userIds = _userManager
|
||||
.Users
|
||||
@@ -130,6 +134,11 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||
|
||||
async void _installationManager_PackageInstallationCompleted(object sender, InstallationEventArgs e)
|
||||
{
|
||||
if (!_config.Configuration.NotificationOptions.SendOnUpdates)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var installationInfo = e.InstallationInfo;
|
||||
|
||||
var userIds = _userManager
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
"TabProfile": "Profile",
|
||||
"TabMetadata": "Metadata",
|
||||
"TabImages": "Images",
|
||||
"TabNotifications": "Notifications"
|
||||
"TabCollectionTitles": "Titles",
|
||||
"LabelDisplayMissingEpisodesWithinSeasons": "Display missing episodes within seasons",
|
||||
"LabelUnairedMissingEpisodesWithinSeasons": "Display unaired episodes within seasons",
|
||||
@@ -554,5 +555,11 @@
|
||||
"HeaderRequireManualLogin": "Require manual username entry for:",
|
||||
"HeaderRequireManualLoginHelp": "When disabled clients may present a login screen with a visual selection of users.",
|
||||
"OptionOtherApps": "Other apps",
|
||||
"OptionMobileApps": "Mobile apps"
|
||||
"OptionMobileApps": "Mobile apps",
|
||||
"HeaderEnableNotificationForEvents": "Send notifications for the following events:",
|
||||
"OptionNotifyOnUpdates": "When updates are available",
|
||||
"OptionNotifyOnPlayback": "When users play content",
|
||||
"OptionNotifyOnFailedTasks": "When scheduled tasks fail",
|
||||
"OptionNotifyOnNewLibraryContent": "When new library content is added",
|
||||
"SendNotificationHelp": "Notifications are delivered to the dashboard inbox. Browse the plugin catalog to install additional notification formats such as email and text messaging."
|
||||
}
|
||||
Reference in New Issue
Block a user