1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-21 01:49:57 +02:00
Sonarr/NzbDrone.Core/Indexers/IndexerBase.cs

43 lines
1.3 KiB
C#
Raw Normal View History

2013-04-07 10:30:37 +03:00
using System;
using System.Collections.Generic;
namespace NzbDrone.Core.Indexers
{
public abstract class IndexerBase : IIndexer
2013-04-07 10:30:37 +03:00
{
2013-04-11 02:44:48 +03:00
public abstract string Name { get; }
2013-04-07 10:30:37 +03:00
public abstract IndexerKind Kind { get; }
public virtual bool EnableByDefault { get { return true; } }
public IndexerDefinition InstanceDefinition { get; set; }
2013-04-07 10:30:37 +03:00
public virtual IEnumerable<IndexerDefinition> DefaultDefinitions
2013-04-07 10:30:37 +03:00
{
get
{
yield return new IndexerDefinition
{
Name = Name,
2013-08-02 02:34:36 +03:00
Enable = EnableByDefault,
Implementation = GetType().Name,
2013-05-20 02:17:32 +03:00
Settings = String.Empty
};
2013-04-07 10:30:37 +03:00
}
}
2013-09-14 02:17:58 +03:00
public virtual IParseFeed Parser { get; private set; }
2013-04-07 10:30:37 +03:00
public abstract IEnumerable<string> RecentFeed { get; }
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, int offset);
2013-04-07 10:30:37 +03:00
}
public enum IndexerKind
{
Usenet,
Torrent
}
2013-04-07 10:30:37 +03:00
}