示例#1
0
        // Override to load legacy config format
        public override void LoadFromSavedConfiguration(JToken jsonConfig)
        {
            var json = jsonConfig.ToString();

            configData   = JsonConvert.DeserializeObject <ConfigurationDataRuTor>(json);
            IsConfigured = true;
        }
示例#2
0
        public async Task ApplyConfiguration(JToken configJson)
        {
            configData.LoadValuesFromJson(configJson);
            var oldConfig = configData;
            var releases  = await PerformQuery(new TorznabQuery());

            await ConfigureIfOK(string.Empty, releases.Count() > 0, () =>
            {
                configData = oldConfig;
                throw new Exception("Could not find releases from this URL");
            });
        }
示例#3
0
文件: RUTor.cs 项目: m0thman/Jackett
        public async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
        {
            configData.LoadValuesFromJson(configJson);
            var oldConfig = configData;
            var releases = await PerformQuery(new TorznabQuery());

            await ConfigureIfOK(string.Empty, releases.Count() > 0, () =>
            {
                configData = oldConfig;
                throw new Exception("Could not find releases from this URL");
            });

            return IndexerConfigurationStatus.RequiresTesting;
        }
示例#4
0
文件: RUTor.cs 项目: m0thman/Jackett
 // Override to load legacy config format
 public override void LoadFromSavedConfiguration(JToken jsonConfig)
 {
     var json = jsonConfig.ToString();
     configData = JsonConvert.DeserializeObject<ConfigurationDataRuTor>(json);
     IsConfigured = true;
 }