コード例 #1
0
ファイル: ReleaseModule.cs プロジェクト: scottrice/NzbDrone
        private List <ReleaseResource> GetRss()
        {
            var reports   = _rssFetcherAndParser.Fetch();
            var decisions = _downloadDecisionMaker.GetRssDecision(reports);

            return(MapDecisions(decisions));
        }
コード例 #2
0
ファイル: ReleasePushModule.cs プロジェクト: ocervell/Gamearr
        private Response ProcessRelease(ReleaseResource release)
        {
            _logger.Info("Release pushed: {0} - {1}", release.Title, release.DownloadUrl);

            var info = release.ToModel();

            info.Guid = "PUSH-" + info.DownloadUrl;

            ResolveIndexer(info);

            var decisions = _downloadDecisionMaker.GetRssDecision(new List <ReleaseInfo> {
                info
            });

            _downloadDecisionProcessor.ProcessDecisions(decisions);

            var firstDecision = decisions.FirstOrDefault();

            if (firstDecision?.RemoteAlbum.ParsedAlbumInfo == null)
            {
                throw new ValidationException(new List <ValidationFailure> {
                    new ValidationFailure("Title", "Unable to parse", release.Title)
                });
            }

            return(MapDecisions(new[] { firstDecision }).First().AsResponse());
        }
コード例 #3
0
        private List <ReleaseResource> GetRss()
        {
            var reports              = _rssFetcherAndParser.Fetch();
            var decisions            = _downloadDecisionMaker.GetRssDecision(reports);
            var prioritizedDecisions = _prioritizeDownloadDecision.PrioritizeDecisionsForMovies(decisions);

            return(MapDecisions(prioritizedDecisions));
        }
コード例 #4
0
ファイル: RssSyncService.cs プロジェクト: gschizas/NzbDrone
        public void Sync()
        {
            _logger.ProgressInfo("Starting RSS Sync");

            var reports    = _rssFetcherAndParser.Fetch();
            var decisions  = _downloadDecisionMaker.GetRssDecision(reports);
            var downloaded = _downloadApprovedReports.DownloadApproved(decisions);

            _logger.ProgressInfo("RSS Sync Completed. Reports found: {0}, Reports downloaded: {1}", reports.Count, downloaded.Count());
        }
コード例 #5
0
        private Response ProcessRelease(ReleaseResource release)
        {
            _logger.Info("Release pushed: {0} - {1}", release.Title, release.DownloadUrl);

            var info = release.InjectTo <ReleaseInfo>();

            info.Guid = "PUSH-" + info.DownloadUrl;

            var decisions = _downloadDecisionMaker.GetRssDecision(new List <ReleaseInfo> {
                info
            });
            var processed = _downloadDecisionProcessor.ProcessDecisions(decisions);

            return(MapDecisions(decisions).First().AsResponse());
        }
コード例 #6
0
ファイル: ReleasePushModule.cs プロジェクト: Macharr/Macharr
        private object ProcessRelease(ReleaseResource release)
        {
            _logger.Info("Release pushed: {0} - {1}", release.Title, release.DownloadUrl);

            var info = release.ToModel();

            info.Guid = "PUSH-" + info.DownloadUrl;

            ResolveIndexer(info);

            var decisions = _downloadDecisionMaker.GetRssDecision(new List <ReleaseInfo> {
                info
            });

            _downloadDecisionProcessor.ProcessDecisions(decisions);

            return(MapDecisions(decisions).First());
        }
コード例 #7
0
ファイル: RssSyncService.cs プロジェクト: z00nx/Sonarr
        private ProcessedDecisions Sync()
        {
            _logger.ProgressInfo("Starting RSS Sync");

            var reports   = _rssFetcherAndParser.Fetch().Concat(_pendingReleaseService.GetPending()).ToList();
            var decisions = _downloadDecisionMaker.GetRssDecision(reports);
            var processed = _processDownloadDecisions.ProcessDecisions(decisions);

            var message = String.Format("RSS Sync Completed. Reports found: {0}, Reports grabbed: {1}", reports.Count, processed.Grabbed.Count);

            if (processed.Pending.Any())
            {
                message += ", Reports pending: " + processed.Pending.Count;
            }

            _logger.ProgressInfo(message);

            return(processed);
        }