mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-24 08:42:19 +02:00
Improve messaging for for Send Notifications setting in Emby / Jellyfin
Closes #7042
This commit is contained in:
parent
4ff83f9efc
commit
4c0b896174
@ -1325,8 +1325,8 @@
|
||||
"NotificationsEmailSettingsUseEncryption": "Use Encryption",
|
||||
"NotificationsEmailSettingsUseEncryptionHelpText": "Whether to prefer using encryption if configured on the server, to always use encryption via SSL (Port 465 only) or StartTLS (any other port) or to never use encryption",
|
||||
"NotificationsEmbySettingsSendNotifications": "Send Notifications",
|
||||
"NotificationsEmbySettingsSendNotificationsHelpText": "Have MediaBrowser send notifications to configured providers",
|
||||
"NotificationsEmbySettingsUpdateLibraryHelpText": "Update Library on Import, Rename, or Delete?",
|
||||
"NotificationsEmbySettingsSendNotificationsHelpText": "Have Emby send notifications to configured providers. Not supported on Jellyfin.",
|
||||
"NotificationsEmbySettingsUpdateLibraryHelpText": "Update Library on Import, Rename, or Delete",
|
||||
"NotificationsGotifySettingIncludeSeriesPoster": "Include Series Poster",
|
||||
"NotificationsGotifySettingIncludeSeriesPosterHelpText": "Include series poster in message",
|
||||
"NotificationsGotifySettingsAppToken": "App Token",
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Common.Serializer;
|
||||
@ -24,6 +25,7 @@ public void Notify(MediaBrowserSettings settings, string title, string message)
|
||||
var path = "/Notifications/Admin";
|
||||
var request = BuildRequest(path, settings);
|
||||
request.Headers.ContentType = "application/json";
|
||||
request.LogHttpError = false;
|
||||
|
||||
request.SetContent(new
|
||||
{
|
||||
@ -32,7 +34,21 @@ public void Notify(MediaBrowserSettings settings, string title, string message)
|
||||
ImageUrl = "https://raw.github.com/Sonarr/Sonarr/develop/Logo/64.png"
|
||||
}.ToJson());
|
||||
|
||||
ProcessRequest(request, settings);
|
||||
try
|
||||
{
|
||||
ProcessRequest(request, settings);
|
||||
}
|
||||
catch (HttpException e)
|
||||
{
|
||||
if (e.Response.StatusCode == HttpStatusCode.NotFound)
|
||||
{
|
||||
_logger.Warn("Unable to send notification to Emby. If you're using Jellyfin disable 'Send Notifications'");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HashSet<string> GetPaths(MediaBrowserSettings settings, Series series)
|
||||
|
@ -25,6 +25,7 @@ public class MediaBrowserSettings : NotificationSettingsBase<MediaBrowserSetting
|
||||
public MediaBrowserSettings()
|
||||
{
|
||||
Port = 8096;
|
||||
UpdateLibrary = true;
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Host")]
|
||||
|
Loading…
Reference in New Issue
Block a user