@ -218,7 +218,7 @@ namespace PlexRequests.UI.Modules
var settings = PrService . GetSettings ( ) ;
Log . Trace ( settings . DumpJson ( ) ) ;
if ( ! settings . Require Approval)
if ( ! settings . Require Movie Approval)
{
var cpSettings = CpService . GetSettings ( ) ;
@ -234,6 +234,9 @@ namespace PlexRequests.UI.Modules
Log . Debug ( "Adding movie to database requests (No approval required)" ) ;
RequestService . AddRequest ( model ) ;
var notificationModel = new NotificationModel { Title = model . Title , User = model . RequestedBy , DateTime = DateTime . Now , NotificationType = NotificationType . NewRequest } ;
NotificationService . Publish ( notificationModel ) ;
return Response . AsJson ( new JsonResponseModel { Result = true } ) ;
}
return Response . AsJson ( new JsonResponseModel { Result = false , Message = "Something went wrong adding the movie to CouchPotato! Please check your settings." } ) ;
@ -324,7 +327,7 @@ namespace PlexRequests.UI.Modules
model . SeasonList = seasonsList . ToArray ( ) ;
var settings = PrService . GetSettings ( ) ;
if ( ! settings . Require Approval)
if ( ! settings . Require TvShow Approval)
{
var sonarrSettings = SonarrService . GetSettings ( ) ;
var sender = new TvSender ( SonarrApi , SickrageApi ) ;
@ -339,6 +342,9 @@ namespace PlexRequests.UI.Modules
return Response . AsJson ( new JsonResponseModel { Result = true } ) ;
}
var notify1 = new NotificationModel { Title = model . Title , User = model . RequestedBy , DateTime = DateTime . Now , NotificationType = NotificationType . NewRequest } ;
NotificationService . Publish ( notify1 ) ;
return Response . AsJson ( new JsonResponseModel { Result = false , Message = "Something went wrong adding the movie to Sonarr! Please check your settings." } ) ;
}
@ -353,6 +359,9 @@ namespace PlexRequests.UI.Modules
Log . Debug ( "Adding tv to database requests (No approval required & SickRage)" ) ;
RequestService . AddRequest ( model ) ;
var notify2 = new NotificationModel { Title = model . Title , User = model . RequestedBy , DateTime = DateTime . Now , NotificationType = NotificationType . NewRequest } ;
NotificationService . Publish ( notify2 ) ;
return Response . AsJson ( new JsonResponseModel { Result = true } ) ;
}
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." } ) ;