mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 04:51:45 +02:00
indexers implementation is now separated from settings/definition
so we can have multiple newznab definitions.
This commit is contained in:
43
NzbDrone.Core/Indexers/IndexerBase.cs
Normal file
43
NzbDrone.Core/Indexers/IndexerBase.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public abstract class IndexerBase : IIndexer
|
||||
{
|
||||
public abstract string Name { get; }
|
||||
|
||||
public IndexerDefinition InstanceDefinition { get; set; }
|
||||
|
||||
public virtual IEnumerable<IndexerDefinition> DefaultDefinitions
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return new IndexerDefinition
|
||||
{
|
||||
Name = Name,
|
||||
Enable = true,
|
||||
Implementation = GetType().Name,
|
||||
Settings = string.Empty
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public virtual IParseFeed Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return new BasicRssParser();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract IEnumerable<string> RecentFeed { get; }
|
||||
|
||||
public abstract IEnumerable<string> GetEpisodeSearchUrls(string seriesTitle, int seasonNumber, int episodeNumber);
|
||||
public abstract IEnumerable<string> GetDailyEpisodeSearchUrls(string seriesTitle, DateTime date);
|
||||
public abstract IEnumerable<string> GetSeasonSearchUrls(string seriesTitle, int seasonNumber);
|
||||
public abstract IEnumerable<string> GetPartialSeasonSearchUrls(string seriesTitle, int seasonNumber, int episodeWildcard);
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user