예제 #1
0
 public override void OnGrab(GrabMessage message)
 {
     _twitterService.SendNotification($"Grabbed: {message.Message}", Settings);
 }
예제 #2
0
파일: PlexClient.cs 프로젝트: Gadarr/Gadarr
 public override void OnGrab(GrabMessage grabMessage)
 {
     _plexClientService.Notify(Settings, EPISODE_GRABBED_TITLE_BRANDED, grabMessage.Message);
 }
예제 #3
0
        public override void OnGrab(GrabMessage grabMessage)
        {
            var body = $"{grabMessage.Message} sent to queue.";

            SendEmail(Settings, BOOK_GRABBED_TITLE_BRANDED, body);
        }
예제 #4
0
        public override void OnGrab(GrabMessage grabMessage)
        {
            const string header = "Radarr - Grabbed";

            Notify(Settings, header, grabMessage.Message);
        }
예제 #5
0
파일: Mailgun.cs 프로젝트: whoshoe/Readarr
 public override void OnGrab(GrabMessage grabMessage)
 {
     _proxy.SendNotification(BOOK_GRABBED_TITLE, grabMessage.Message, Settings);
 }
예제 #6
0
        public override void OnGrab(GrabMessage grabMessage)
        {
            var body = $"{grabMessage.Message} sent to queue.";

            _emailService.SendEmail(Settings, EPISODE_GRABBED_TITLE_BRANDED, body);
        }
예제 #7
0
 public override void OnGrab(GrabMessage message)
 {
     _service.OnGrab(message.Movie, message.RemoteMovie, message.Quality, Settings);
 }
예제 #8
0
파일: Growl.cs 프로젝트: novarr/Comarr
        public override void OnGrab(GrabMessage grabMessage)
        {
            const string title = "Episode Grabbed";

            _growlService.SendNotification(title, grabMessage.Message, "GRAB", Settings.Host, Settings.Port, Settings.Password);
        }
예제 #9
0
 public override void OnGrab(GrabMessage grabMessage)
 {
     _proxy.SendNotification(MOVIE_GRABBED_TITLE_BRANDED, grabMessage.Message, Settings);
 }
예제 #10
0
        public override void OnGrab(GrabMessage grabMessage)
        {
            const string title = "Radarr - Movie Grabbed";

            _proxy.SendNotification(title, grabMessage.Message, Settings);
        }
예제 #11
0
파일: Discord.cs 프로젝트: pixxon/Sonarr
        public override void OnGrab(GrabMessage message)
        {
            var series   = message.Series;
            var episodes = message.Episode.Episodes;

            var embed = new Embed
            {
                Author = new DiscordAuthor
                {
                    Name    = Settings.Author.IsNullOrWhiteSpace() ? Environment.MachineName : Settings.Author,
                    IconUrl = "https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/256.png"
                },
                Url         = $"http://thetvdb.com/?tab=series&id={series.TvdbId}",
                Description = "Episode Grabbed",
                Title       = GetTitle(series, episodes),
                Color       = (int)DiscordColors.Standard,
                Fields      = new List <DiscordField>(),
                Timestamp   = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
            };

            if (Settings.GrabFields.Contains((int)DiscordGrabFieldType.Poster))
            {
                embed.Thumbnail = new DiscordImage
                {
                    Url = series.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Poster)?.Url
                };
            }

            if (Settings.GrabFields.Contains((int)DiscordGrabFieldType.Fanart))
            {
                embed.Image = new DiscordImage
                {
                    Url = series.Images.FirstOrDefault(x => x.CoverType == MediaCoverTypes.Fanart)?.Url
                };
            }

            foreach (var field in Settings.GrabFields)
            {
                var discordField = new DiscordField();

                switch ((DiscordGrabFieldType)field)
                {
                case DiscordGrabFieldType.Overview:
                    var overview = episodes.First().Overview ?? "";
                    discordField.Name  = "Overview";
                    discordField.Value = overview.Length <= 300 ? overview : overview.Substring(0, 300) + "...";
                    break;

                case DiscordGrabFieldType.Rating:
                    discordField.Name  = "Rating";
                    discordField.Value = episodes.First().Ratings.Value.ToString();
                    break;

                case DiscordGrabFieldType.Genres:
                    discordField.Name  = "Genres";
                    discordField.Value = series.Genres.Take(5).Join(", ");
                    break;

                case DiscordGrabFieldType.Quality:
                    discordField.Name   = "Quality";
                    discordField.Inline = true;
                    discordField.Value  = message.Quality.Quality.Name;
                    break;

                case DiscordGrabFieldType.Group:
                    discordField.Name  = "Group";
                    discordField.Value = message.Episode.ParsedEpisodeInfo.ReleaseGroup;
                    break;

                case DiscordGrabFieldType.Size:
                    discordField.Name   = "Size";
                    discordField.Value  = BytesToString(message.Episode.Release.Size);
                    discordField.Inline = true;
                    break;

                case DiscordGrabFieldType.Release:
                    discordField.Name  = "Release";
                    discordField.Value = string.Format("```{0}```", message.Episode.Release.Title);
                    break;

                case DiscordGrabFieldType.Links:
                    discordField.Name  = "Links";
                    discordField.Value = GetLinksString(series);
                    break;
                }

                if (discordField.Name.IsNotNullOrWhiteSpace() && discordField.Value.IsNotNullOrWhiteSpace())
                {
                    embed.Fields.Add(discordField);
                }
            }

            var payload = CreatePayload(null, new List <Embed> {
                embed
            });

            _proxy.SendPayload(payload, Settings);
        }
예제 #12
0
파일: Growl.cs 프로젝트: zobe123/Lidarr
 public override void OnGrab(GrabMessage grabMessage)
 {
     _growlService.SendNotification(ALBUM_GRABBED_TITLE, grabMessage.Message, "GRAB", Settings.Host, Settings.Port, Settings.Password);
 }
예제 #13
0
 public override void OnGrab(GrabMessage grabMessage)
 {
     TestLogger.Info("OnGrab was called");
 }
예제 #14
0
 public override void OnGrab(GrabMessage grabMessage)
 {
     _prowlProxy.SendNotification(EPISODE_GRABBED_TITLE, grabMessage.Message, Settings.ApiKey, (ProwlPriority)Settings.Priority);
 }
예제 #15
0
파일: Join.cs 프로젝트: Gadarr/Gadarr
 public override void OnGrab(GrabMessage message)
 {
     _proxy.SendNotification(EPISODE_GRABBED_TITLE_BRANDED, message.Message, Settings);
 }
예제 #16
0
        public override void OnGrab(GrabMessage grabMessage)
        {
            const string title = "Movie Grabbed";

            _proxy.SendNotification(title, grabMessage.Message, Settings.ApiKey, (NotifyMyAndroidPriority)Settings.Priority);
        }