Пример #1
0
        protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent)
        {
            var category = Settings.TvCategory;
            var priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;

            var response = _proxy.DownloadNzb(fileContent, filename, category, priority, Settings);

            return(response);
        }
Пример #2
0
        protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent)
        {
            var category = Settings.TvCategory;
            var priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;

            var response = _proxy.DownloadNzb(fileContent, filename, category, priority, Settings);

            if (response == null)
            {
                throw new DownloadClientException("Failed to add nzb {0}", filename);
            }

            return(response);
        }
Пример #3
0
        protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContent)
        {
            var category  = Settings.TvCategory;
            var priority  = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;
            var addpaused = Settings.AddPaused;
            var response  = _proxy.DownloadNzb(fileContent, filename, category, priority, addpaused, Settings);

            if (response == null)
            {
                throw new DownloadClientRejectedReleaseException(remoteEpisode.Release, "NZBGet rejected the NZB for an unknown reason");
            }

            return(response);
        }
Пример #4
0
        protected override string AddFromNzbFile(RemoteMovie remoteMovie, string filename, byte[] fileContents)
        {
            var category = Settings.TvCategory; // TODO: Update this to MovieCategory?

            var priority = Settings.RecentTvPriority;

            var addpaused = Settings.AddPaused;

            var response = _proxy.DownloadNzb(fileContents, filename, category, priority, addpaused, Settings);

            if (response == null)
            {
                throw new DownloadClientException("Failed to add nzb {0}", filename);
            }

            return(response);
        }
Пример #5
0
        protected override string AddFromNzbFile(RemoteAlbum remoteAlbum, string filename, byte[] fileContent)
        {
            var category = Settings.MusicCategory;

            var priority = remoteAlbum.IsRecentAlbum() ? Settings.RecentTvPriority : Settings.OlderTvPriority;

            var addpaused = Settings.AddPaused;

            var response = _proxy.DownloadNzb(fileContent, filename, category, priority, addpaused, Settings);

            if (response == null)
            {
                throw new DownloadClientException("Failed to add nzb {0}", filename);
            }

            return(response);
        }
Пример #6
0
        public override string DownloadNzb(RemoteEpisode remoteEpisode)
        {
            var url   = remoteEpisode.Release.DownloadUrl;
            var title = remoteEpisode.Release.Title + ".nzb";

            string category = Settings.TvCategory;
            int    priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;

            _logger.Info("Adding report [{0}] to the queue.", title);

            using (var nzb = _httpProvider.DownloadStream(url))
            {
                _logger.Info("Adding report [{0}] to the queue.", title);
                var response = _proxy.DownloadNzb(nzb, title, category, priority, Settings);

                return(response);
            }
        }