예제 #1
0
        public void Handle(DownloadIgnoredEvent message)
        {
            var historyToAdd = new List <History>();

            foreach (var episodeId in message.EpisodeIds)
            {
                var history = new History
                {
                    EventType   = HistoryEventType.DownloadIgnored,
                    Date        = DateTime.UtcNow,
                    Quality     = message.Quality,
                    SourceTitle = message.SourceTitle,
                    SeriesId    = message.SeriesId,
                    EpisodeId   = episodeId,
                    DownloadId  = message.DownloadId,
                    Language    = message.Language
                };

                history.Data.Add("DownloadClient", message.DownloadClient);
                history.Data.Add("Message", message.Message);

                historyToAdd.Add(history);
            }

            _historyRepository.InsertMany(historyToAdd);
        }
예제 #2
0
        public void Handle(DownloadIgnoredEvent message)
        {
            var historyToAdd = new List <EpisodeHistory>();

            foreach (var episodeId in message.EpisodeIds)
            {
                var history = new EpisodeHistory
                {
                    EventType   = EpisodeHistoryEventType.DownloadIgnored,
                    Date        = DateTime.UtcNow,
                    Quality     = message.Quality,
                    SourceTitle = message.SourceTitle,
                    SeriesId    = message.SeriesId,
                    EpisodeId   = episodeId,
                    DownloadId  = message.DownloadId,
                    Language    = message.Language
                };

                history.Data.Add("DownloadClient", message.DownloadClientInfo.Type);
                history.Data.Add("DownloadClientName", message.DownloadClientInfo.Name);
                history.Data.Add("Message", message.Message);
                history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteEpisode?.ParsedEpisodeInfo?.ReleaseGroup);

                historyToAdd.Add(history);
            }

            _historyRepository.InsertMany(historyToAdd);
        }
예제 #3
0
        public void Handle(DownloadIgnoredEvent message)
        {
            var historyToAdd = new List <History>();

            foreach (var bookId in message.BookIds)
            {
                var history = new History
                {
                    EventType   = HistoryEventType.DownloadIgnored,
                    Date        = DateTime.UtcNow,
                    Quality     = message.Quality,
                    SourceTitle = message.SourceTitle,
                    AuthorId    = message.AuthorId,
                    BookId      = bookId,
                    DownloadId  = message.DownloadId
                };

                history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
                history.Data.Add("Message", message.Message);

                historyToAdd.Add(history);
            }

            _historyRepository.InsertMany(historyToAdd);
        }
예제 #4
0
        public void Handle(DownloadIgnoredEvent message)
        {
            var history = new DownloadHistory
            {
                EventType        = DownloadHistoryEventType.DownloadIgnored,
                MovieId          = message.MovieId,
                DownloadId       = message.DownloadId,
                SourceTitle      = message.SourceTitle,
                Date             = DateTime.UtcNow,
                Protocol         = message.DownloadClientInfo.Protocol,
                DownloadClientId = message.DownloadClientInfo.Id
            };

            history.Data.Add("DownloadClient", message.DownloadClientInfo.Type);
            history.Data.Add("DownloadClientName", message.DownloadClientInfo.Name);

            _repository.Insert(history);
        }
예제 #5
0
        public void Handle(DownloadIgnoredEvent message)
        {
            var history = new MovieHistory
            {
                EventType   = MovieHistoryEventType.DownloadIgnored,
                Date        = DateTime.UtcNow,
                Quality     = message.Quality,
                SourceTitle = message.SourceTitle,
                MovieId     = message.MovieId,
                DownloadId  = message.DownloadId,
                Languages   = message.Languages
            };

            history.Data.Add("DownloadClient", message.DownloadClientInfo.Type);
            history.Data.Add("DownloadClientName", message.DownloadClientInfo.Name);
            history.Data.Add("Message", message.Message);

            _historyRepository.Insert(history);
        }