public override void OnGrab(GrabMessage message) { var movie = message.Movie; var remoteMovie = message.RemoteMovie; var quality = message.Quality; var variables = new StringDictionary(); variables.Add("Radarr_EventType", "Grab"); variables.Add("Radarr_Movie_Id", movie.Id.ToString()); variables.Add("Radarr_Movie_Title", movie.Title); variables.Add("Radarr_Movie_Year", movie.Year.ToString()); variables.Add("Radarr_Movie_ImdbId", movie.ImdbId ?? string.Empty); variables.Add("Radarr_Movie_TmdbId", movie.TmdbId.ToString()); variables.Add("Radarr_Movie_In_Cinemas_Date", movie.InCinemas.ToString() ?? string.Empty); variables.Add("Radarr_Movie_Physical_Release_Date", movie.PhysicalRelease.ToString() ?? string.Empty); variables.Add("Radarr_Release_Title", remoteMovie.Release.Title); variables.Add("Radarr_Release_Indexer", remoteMovie.Release.Indexer ?? string.Empty); variables.Add("Radarr_Release_Size", remoteMovie.Release.Size.ToString()); variables.Add("Radarr_Release_ReleaseGroup", remoteMovie.ParsedMovieInfo.ReleaseGroup ?? string.Empty); variables.Add("Radarr_Release_Quality", quality.Quality.Name); variables.Add("Radarr_Release_QualityVersion", quality.Revision.Version.ToString()); variables.Add("Radarr_IndexerFlags", remoteMovie.Release.IndexerFlags.ToString()); variables.Add("Radarr_Download_Client", message.DownloadClient ?? string.Empty); variables.Add("Radarr_Download_Id", message.DownloadId ?? string.Empty); _proxy.SendNotification(variables, Settings); }
public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck) { var variables = new StringDictionary(); variables.Add("Prowlarr_EventType", "HealthIssue"); variables.Add("Prowlarr_Health_Issue_Level", healthCheck.Type.ToString() ?? string.Empty); variables.Add("Prowlarr_Health_Issue_Message", healthCheck.Message); variables.Add("Prowlarr_Health_Issue_Type", healthCheck.Source.Name); variables.Add("Prowlarr_Health_Issue_Wiki", healthCheck.WikiUrl.ToString() ?? string.Empty); _proxy.SendNotification(variables, Settings); }
public override void OnGrab(GrabMessage message) { var author = message.Author; var remoteBook = message.Book; var releaseGroup = remoteBook.ParsedBookInfo.ReleaseGroup; var variables = new StringDictionary(); variables.Add("Readarr_EventType", "Grab"); variables.Add("Readarr_Author_Id", author.Id.ToString()); variables.Add("Readarr_Author_Name", author.Metadata.Value.Name); variables.Add("Readarr_Author_GRId", author.Metadata.Value.ForeignAuthorId); variables.Add("Readarr_Release_BookCount", remoteBook.Books.Count.ToString()); variables.Add("Readarr_Release_BookReleaseDates", string.Join(",", remoteBook.Books.Select(e => e.ReleaseDate))); variables.Add("Readarr_Release_BookTitles", string.Join("|", remoteBook.Books.Select(e => e.Title))); variables.Add("Readarr_Release_BookIds", string.Join("|", remoteBook.Books.Select(e => e.Id.ToString()))); variables.Add("Readarr_Release_GRIds", remoteBook.Books.Select(x => x.Editions.Value.Single(e => e.Monitored).ForeignEditionId).ConcatToString("|")); variables.Add("Readarr_Release_Title", remoteBook.Release.Title); variables.Add("Readarr_Release_Indexer", remoteBook.Release.Indexer ?? string.Empty); variables.Add("Readarr_Release_Size", remoteBook.Release.Size.ToString()); variables.Add("Readarr_Release_Quality", remoteBook.ParsedBookInfo.Quality.Quality.Name); variables.Add("Readarr_Release_QualityVersion", remoteBook.ParsedBookInfo.Quality.Revision.Version.ToString()); variables.Add("Readarr_Release_ReleaseGroup", releaseGroup ?? string.Empty); variables.Add("Readarr_Download_Client", message.DownloadClient ?? string.Empty); variables.Add("Readarr_Download_Id", message.DownloadId ?? string.Empty); _proxy.SendNotification(variables, Settings); }