2013-04-07 09:30:37 +02:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Indexers
|
|
|
|
{
|
2013-05-02 03:59:09 +02:00
|
|
|
public abstract class IndexerBase : IIndexer
|
2013-04-07 09:30:37 +02:00
|
|
|
{
|
2013-04-11 01:44:48 +02:00
|
|
|
public abstract string Name { get; }
|
2013-04-07 09:30:37 +02:00
|
|
|
|
2013-07-04 23:20:08 +02:00
|
|
|
public virtual bool EnableByDefault { get { return true; } }
|
|
|
|
|
2013-05-02 03:59:09 +02:00
|
|
|
public IndexerDefinition InstanceDefinition { get; set; }
|
2013-04-07 09:30:37 +02:00
|
|
|
|
2013-05-02 03:59:09 +02:00
|
|
|
public virtual IEnumerable<IndexerDefinition> DefaultDefinitions
|
2013-04-07 09:30:37 +02:00
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
2013-05-02 03:59:09 +02:00
|
|
|
yield return new IndexerDefinition
|
|
|
|
{
|
|
|
|
Name = Name,
|
2013-08-02 01:34:36 +02:00
|
|
|
Enable = EnableByDefault,
|
2013-05-02 03:59:09 +02:00
|
|
|
Implementation = GetType().Name,
|
2013-05-20 01:17:32 +02:00
|
|
|
Settings = String.Empty
|
2013-05-02 03:59:09 +02:00
|
|
|
};
|
2013-04-07 09:30:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual IParseFeed Parser
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return new BasicRssParser();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract IEnumerable<string> RecentFeed { get; }
|
2013-08-06 09:38:16 +02:00
|
|
|
public abstract IEnumerable<string> GetEpisodeSearchUrls(string seriesTitle, int tvRageId, int seasonNumber, int episodeNumber);
|
|
|
|
public abstract IEnumerable<string> GetDailyEpisodeSearchUrls(string seriesTitle, int tvRageId, DateTime date);
|
|
|
|
public abstract IEnumerable<string> GetSeasonSearchUrls(string seriesTitle, int tvRageId, int seasonNumber);
|
2013-04-07 09:30:37 +02:00
|
|
|
}
|
|
|
|
}
|