mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 06:00:50 -07:00
Fixed the issue where we mark as unavailable and a declined notification gets triggered #1371
This commit is contained in:
parent
213e54e02d
commit
deb5878405
1 changed files with 13 additions and 10 deletions
|
@ -526,18 +526,21 @@ namespace Ombi.UI.Modules
|
|||
var result = await Service.UpdateRequestAsync(originalRequest);
|
||||
|
||||
var plexSettings = await PlexSettings.GetSettingsAsync();
|
||||
if (plexSettings.Enable)
|
||||
if (available)
|
||||
{
|
||||
await
|
||||
PlexNotificationEngine.NotifyUsers(originalRequest,
|
||||
available ? NotificationType.RequestAvailable : NotificationType.RequestDeclined);
|
||||
}
|
||||
if (plexSettings.Enable)
|
||||
{
|
||||
await
|
||||
PlexNotificationEngine.NotifyUsers(originalRequest,
|
||||
NotificationType.RequestAvailable);
|
||||
}
|
||||
|
||||
var embySettings = await EmbySettings.GetSettingsAsync();
|
||||
if (embySettings.Enable)
|
||||
{
|
||||
await EmbyNotificationEngine.NotifyUsers(originalRequest,
|
||||
available ? NotificationType.RequestAvailable : NotificationType.RequestDeclined);
|
||||
var embySettings = await EmbySettings.GetSettingsAsync();
|
||||
if (embySettings.Enable)
|
||||
{
|
||||
await EmbyNotificationEngine.NotifyUsers(originalRequest,
|
||||
NotificationType.RequestAvailable);
|
||||
}
|
||||
}
|
||||
return Response.AsJson(result
|
||||
? new { Result = true, Available = available, Message = string.Empty }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue