示例#1
0
 public BaseIndexer(string name, string description, Uri link, TorznabCapabilities caps, IIndexerManagerService manager,Logger logger)
 {
     DisplayName = name;
     DisplayDescription = description;
     SiteLink = link;
     TorznabCaps = caps;
     this.logger = logger;
     indexerService = manager;
 }
示例#2
0
 public static TorznabCapabilities CreateDefaultTorznabTVCaps()
 {
     var caps = new TorznabCapabilities();
     caps.Categories.AddRange(new[] {
         TorznabCatType.TV,
         TorznabCatType.TVSD,
         TorznabCatType.TVHD
     });
     return caps;
 }
示例#3
0
 public static TorznabCapabilities CreateDefaultTorznabTVCaps()
 {
     var caps = new TorznabCapabilities();
     caps.SearchAvailable = true;
     caps.TVSearchAvailable = true;
     caps.SupportsTVRageSearch = false;
     caps.Categories.AddRange(new[] { 
         new TorznabCategory { ID = "5000", Name = "TV" },
         new TorznabCategory { ID = "5030", Name = "TV/SD" },
         new TorznabCategory { ID = "5040", Name = "TV/HD" } 
     });
     return caps;
 }
示例#4
0
        public BaseIndexer(string name, string link, string description, IIndexerManagerService manager, IWebClient client, Logger logger, TorznabCapabilities caps = null)
        {
            if (!link.EndsWith("/"))
                throw new Exception("Site link must end with a slash.");

            DisplayName = name;
            DisplayDescription = description;
            SiteLink = link;
            this.logger = logger;
            indexerService = manager;
            webclient = client;

            if (caps == null)
                caps = TorznabCapsUtil.CreateDefaultTorznabTVCaps();
            TorznabCaps = caps;
        }
示例#5
0
        // standard constructor used by most indexers
        public BaseIndexer(string name, string link, string description, IIndexerManagerService manager, IWebClient client, Logger logger, ConfigurationData configData, IProtectionService p, TorznabCapabilities caps = null, string downloadBase = null)
            : this(manager, client, logger, p)
        {
            if (!link.EndsWith("/"))
                throw new Exception("Site link must end with a slash.");

            DisplayName = name;
            DisplayDescription = description;
            SiteLink = link;
            this.downloadUrlBase = downloadBase;
            this.configData = configData;

            if (caps == null)
                caps = TorznabUtil.CreateDefaultTorznabTVCaps();
            TorznabCaps = caps;

        }