public async Task HandleOnGrabAsync(OnGrabSonarrEvent e)
        {
            Program.LogMsg($"Handling {e.Series.Title}", LogSeverity.Info, "OnGrab");
            //var episodes = new Dictionary<int, bool>();
            var releases = new List <SonarrGrabbedData>();
            var builder  = new EmbedBuilder();

            builder.Title       = "Episodes Grabbed";
            builder.Description = $"{e.Series.Title}; {e.Episodes.Length} episodes found";
            if (!string.IsNullOrWhiteSpace(e.Release.Quality))
            {
                builder.Description += " at " + e.Release.Quality;
            }
            builder.Color = Color.Orange;
            var tags = await GetSeriesTags(e.Series.Id);

            builder.WithFooter(string.Join(", ", tags));
            foreach (var episode in e.Episodes)
            {
                //if (episodes.ContainsKey(episode.Id))
                //    continue;
                var recentGrab = await GetHistory(episode.Id, e.Series.Id);

                if (recentGrab == null)
                {
                    continue;
                }
                //episodes[episode.Id] = true;
                var existing = releases.Any(x => x.guid == recentGrab.data.guid);
                if (builder.ImageUrl == null)
                {
                    builder.ImageUrl = (recentGrab.Series.Images.FirstOrDefault(x => x.CoverType == "poster")
                                        ?? recentGrab.Series.Images.First()).Url;
                }
                Program.LogMsg($"{episode.Id} :: {recentGrab.Series.Title} {recentGrab.data.guid}");
                if (!existing)
                {
                    releases.Add(recentGrab.data);
                }
                if (builder.Fields.Count < 23)
                {
                    builder.AddField($"S{episode.SeasonNumber:00}E{episode.EpisodeNumber:00}", episode.Title, true);
                }
            }
            var relStr = "";

            if (releases.Count == 1)
            {
                relStr = $"[{e.Release.ReleaseTitle}]({releases.First().nzbInfoUrl})";
            }
            else if (releases.Count == 0)
            {
                relStr = "*Failed to get release*";
            }
            else
            {
                foreach (var rel in releases)
                {
                    relStr += $"{rel.nzbInfoUrl}\r\n";
                }
            }
            builder.AddField("Release" + (releases.Count > 1 ? "s" : ""), relStr, false);
            foreach (var channel in Channels)
            {
                if (channel.Channel is NullTextChannel)
                {
                    continue;
                }
                var check = await ShouldSendInChannel(e.Series.Id, channel);

                if (check == false)
                {
                    continue;
                }
                await channel.Channel.SendMessageAsync(embed : builder.Build());
            }
        }
 private void SonarrWebhooksService_OnGrab(object sender, OnGrabSonarrEvent e)
 {
     new Thread(handleGrabThread).Start(e);
 }