private void PublishDownloadFailedEvent(List <History.History> historyItems, string message, TrackedDownload trackedDownload = null)
        {
            var historyItem = historyItems.First();

            var downloadFailedEvent = new DownloadFailedEvent
            {
                MovieId         = historyItem.MovieId,
                Quality         = historyItem.Quality,
                SourceTitle     = historyItem.SourceTitle,
                DownloadClient  = historyItem.Data.GetValueOrDefault(History.History.DOWNLOAD_CLIENT),
                DownloadId      = historyItem.DownloadId,
                Message         = message,
                Data            = historyItem.Data,
                TrackedDownload = trackedDownload
            };

            _eventAggregator.PublishEvent(downloadFailedEvent);
        }
Beispiel #2
0
        private void PublishDownloadFailedEvent(List <History.History> historyItems, string message)
        {
            var historyItem = historyItems.First();

            var downloadFailedEvent = new DownloadFailedEvent
            {
                SeriesId         = historyItem.SeriesId,
                EpisodeIds       = historyItems.Select(h => h.EpisodeId).ToList(),
                Quality          = historyItem.Quality,
                SourceTitle      = historyItem.SourceTitle,
                DownloadClient   = historyItem.Data.GetValueOrDefault(DOWNLOAD_CLIENT),
                DownloadClientId = historyItem.Data.GetValueOrDefault(DOWNLOAD_CLIENT_ID),
                Message          = message
            };

            downloadFailedEvent.Data = downloadFailedEvent.Data.Merge(historyItem.Data);

            _eventAggregator.PublishEvent(downloadFailedEvent);
        }
Beispiel #3
0
        private void PublishDownloadFailedEvent(List <History.History> historyItems, string message, TrackedDownload trackedDownload = null)
        {
            var historyItem = historyItems.First();

            var downloadFailedEvent = new DownloadFailedEvent
            {
                SeriesId        = historyItem.SeriesId,
                EpisodeIds      = historyItems.Select(h => h.EpisodeId).ToList(),
                Quality         = historyItem.Quality,
                SourceTitle     = historyItem.SourceTitle,
                DownloadClient  = historyItem.Data.GetValueOrDefault(History.History.DOWNLOAD_CLIENT),
                DownloadId      = historyItem.DownloadId,
                Message         = message,
                Data            = historyItem.Data,
                TrackedDownload = trackedDownload,
                Language        = historyItem.Language
            };

            _eventAggregator.PublishEvent(downloadFailedEvent);
        }
        private void PublishDownloadFailedEvent(List <EntityHistory> historyItems, string message, TrackedDownload trackedDownload = null, bool skipReDownload = false)
        {
            var historyItem = historyItems.First();

            var downloadFailedEvent = new DownloadFailedEvent
            {
                AuthorId        = historyItem.AuthorId,
                BookIds         = historyItems.Select(h => h.BookId).ToList(),
                Quality         = historyItem.Quality,
                SourceTitle     = historyItem.SourceTitle,
                DownloadClient  = historyItem.Data.GetValueOrDefault(EntityHistory.DOWNLOAD_CLIENT),
                DownloadId      = historyItem.DownloadId,
                Message         = message,
                Data            = historyItem.Data,
                TrackedDownload = trackedDownload,
                SkipReDownload  = skipReDownload
            };

            _eventAggregator.PublishEvent(downloadFailedEvent);
        }
        private void PublishDownloadFailedEvent(List<History.History> historyItems, string message, TrackedDownload trackedDownload = null)
        {
            var historyItem = historyItems.First();

            var downloadFailedEvent = new DownloadFailedEvent
            {
                SeriesId = historyItem.SeriesId,
                EpisodeIds = historyItems.Select(h => h.EpisodeId).ToList(),
                Quality = historyItem.Quality,
                SourceTitle = historyItem.SourceTitle,
                DownloadClient = historyItem.Data.GetValueOrDefault(History.History.DOWNLOAD_CLIENT),
                DownloadId = historyItem.DownloadId,
                Message = message,
                Data = historyItem.Data,
                TrackedDownload = trackedDownload
            };

            _eventAggregator.PublishEvent(downloadFailedEvent);
        }
Beispiel #6
0
        private void PublishDownloadFailedEvent(List<History.History> historyItems, string message)
        {
            var historyItem = historyItems.First();

            var downloadFailedEvent = new DownloadFailedEvent
            {
                SeriesId = historyItem.SeriesId,
                EpisodeIds = historyItems.Select(h => h.EpisodeId).ToList(),
                Quality = historyItem.Quality,
                SourceTitle = historyItem.SourceTitle,
                DownloadClient = historyItem.Data.GetValueOrDefault(DownloadTrackingService.DOWNLOAD_CLIENT),
                DownloadClientId = historyItem.Data.GetValueOrDefault(DownloadTrackingService.DOWNLOAD_CLIENT_ID),
                Message = message
            };

            downloadFailedEvent.Data = downloadFailedEvent.Data.Merge(historyItem.Data);

            _eventAggregator.PublishEvent(downloadFailedEvent);
        }