diff --git a/src/Jackett/Indexers/CardigannIndexer.cs b/src/Jackett/Indexers/CardigannIndexer.cs index a995a9dd4..e8e1895d8 100644 --- a/src/Jackett/Indexers/CardigannIndexer.cs +++ b/src/Jackett/Indexers/CardigannIndexer.cs @@ -36,7 +36,60 @@ namespace Jackett.Indexers get { return (ConfigurationData)base.configData; } set { base.configData = value; } } - + + // A Dictionary allowing the same key multiple times + public class KeyValuePairList : List>, IDictionary + { + public selectorBlock this[string key] + { + get + { + throw new NotImplementedException(); + } + + set + { + base.Add(new KeyValuePair(key, value)); + } + } + + public ICollection Keys + { + get + { + throw new NotImplementedException(); + } + } + + public ICollection Values + { + get + { + throw new NotImplementedException(); + } + } + + public void Add(string key, selectorBlock value) + { + base.Add(new KeyValuePair(key, value)); + } + + public bool ContainsKey(string key) + { + throw new NotImplementedException(); + } + + public bool Remove(string key) + { + throw new NotImplementedException(); + } + + public bool TryGetValue(string key, out selectorBlock value) + { + throw new NotImplementedException(); + } + } + // Cardigann yaml classes public class IndexerDefinition { public string Site { get; set; } @@ -140,7 +193,7 @@ namespace Jackett.Indexers public List Keywordsfilters { get; set; } public Dictionary Inputs { get; set; } public rowsBlock Rows { get; set; } - public Dictionary Fields { get; set; } + public KeyValuePairList Fields { get; set; } } public class rowsBlock : selectorBlock