mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 15:32:37 -07:00
Fixed #244
This commit is contained in:
parent
573ad84fd8
commit
25714f03f7
2 changed files with 53 additions and 21 deletions
|
@ -606,7 +606,7 @@ namespace PlexRequests.UI.Modules
|
|||
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"{fullShowName} is already in Plex!" });
|
||||
}
|
||||
}
|
||||
catch (ApplicationSettingsException)
|
||||
catch (Exception)
|
||||
{
|
||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = $"We could not check if {fullShowName} is in Plex, are you sure it's correctly setup?" });
|
||||
}
|
||||
|
@ -718,6 +718,25 @@ namespace PlexRequests.UI.Modules
|
|||
return Response.AsJson(new JsonResponseModel { Result = false, Message = result?.message != null ? "<b>Message From SickRage: </b>" + result.message : "Something went wrong adding the movie to SickRage! Please check your settings." });
|
||||
}
|
||||
|
||||
if (!srSettings.Enabled && !sonarrSettings.Enabled)
|
||||
{
|
||||
model.Approved = true;
|
||||
Log.Debug("Adding tv to database requests (No approval required) and Sonarr/Sickrage not setup");
|
||||
RequestService.AddRequest(model);
|
||||
if (ShouldSendNotification())
|
||||
{
|
||||
var notify2 = new NotificationModel
|
||||
{
|
||||
Title = model.Title,
|
||||
User = Username,
|
||||
DateTime = DateTime.Now,
|
||||
NotificationType = NotificationType.NewRequest
|
||||
};
|
||||
NotificationService.Publish(notify2);
|
||||
}
|
||||
return Response.AsJson(new JsonResponseModel { Result = true, Message = $"{fullShowName} was successfully added!" });
|
||||
}
|
||||
|
||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = "The request of TV Shows is not correctly set up. Please contact your admin." });
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue