Пример #1
0
        private ValidationFailure TestCategory()
        {
            var config     = _proxy.GetConfig(Settings);
            var categories = GetCategories(config);

            if (!Settings.Category.IsNullOrWhiteSpace() && !categories.Any(v => v.Name == Settings.Category))
            {
                return(new NzbDroneValidationFailure("Category", "Category does not exist")
                {
                    InfoLink = _proxy.GetBaseUrl(Settings),
                    DetailedDescription = "The category you entered doesn't exist in NZBGet. Go to NZBGet to create it."
                });
            }

            return(null);
        }
Пример #2
0
        public override DownloadClientStatus GetStatus()
        {
            var config = _proxy.GetConfig(Settings);

            var category = GetCategories(config).FirstOrDefault(v => v.Name == Settings.TvCategory);

            var status = new DownloadClientStatus
            {
                IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost"
            };

            if (category != null)
            {
                status.OutputRootFolders = new List <OsPath> {
                    _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(category.DestDir))
                };
            }

            return(status);
        }