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",
|
"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",
|
"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",
|
"NotificationsEmbySettingsSendNotifications": "Send Notifications",
|
||||||
"NotificationsEmbySettingsSendNotificationsHelpText": "Have MediaBrowser send notifications to configured providers",
|
"NotificationsEmbySettingsSendNotificationsHelpText": "Have Emby send notifications to configured providers. Not supported on Jellyfin.",
|
||||||
"NotificationsEmbySettingsUpdateLibraryHelpText": "Update Library on Import, Rename, or Delete?",
|
"NotificationsEmbySettingsUpdateLibraryHelpText": "Update Library on Import, Rename, or Delete",
|
||||||
"NotificationsGotifySettingIncludeSeriesPoster": "Include Series Poster",
|
"NotificationsGotifySettingIncludeSeriesPoster": "Include Series Poster",
|
||||||
"NotificationsGotifySettingIncludeSeriesPosterHelpText": "Include series poster in message",
|
"NotificationsGotifySettingIncludeSeriesPosterHelpText": "Include series poster in message",
|
||||||
"NotificationsGotifySettingsAppToken": "App Token",
|
"NotificationsGotifySettingsAppToken": "App Token",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
using NzbDrone.Common.Serializer;
|
using NzbDrone.Common.Serializer;
|
||||||
|
@ -24,6 +25,7 @@ namespace NzbDrone.Core.Notifications.Emby
|
||||||
var path = "/Notifications/Admin";
|
var path = "/Notifications/Admin";
|
||||||
var request = BuildRequest(path, settings);
|
var request = BuildRequest(path, settings);
|
||||||
request.Headers.ContentType = "application/json";
|
request.Headers.ContentType = "application/json";
|
||||||
|
request.LogHttpError = false;
|
||||||
|
|
||||||
request.SetContent(new
|
request.SetContent(new
|
||||||
{
|
{
|
||||||
|
@ -32,8 +34,22 @@ namespace NzbDrone.Core.Notifications.Emby
|
||||||
ImageUrl = "https://raw.github.com/Sonarr/Sonarr/develop/Logo/64.png"
|
ImageUrl = "https://raw.github.com/Sonarr/Sonarr/develop/Logo/64.png"
|
||||||
}.ToJson());
|
}.ToJson());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
ProcessRequest(request, settings);
|
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)
|
public HashSet<string> GetPaths(MediaBrowserSettings settings, Series series)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace NzbDrone.Core.Notifications.Emby
|
||||||
public MediaBrowserSettings()
|
public MediaBrowserSettings()
|
||||||
{
|
{
|
||||||
Port = 8096;
|
Port = 8096;
|
||||||
|
UpdateLibrary = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[FieldDefinition(0, Label = "Host")]
|
[FieldDefinition(0, Label = "Host")]
|
||||||
|
|
Loading…
Reference in New Issue