IndexerType added, this will store the source indexer in history, so users can see (if they care) and we can add an icon if we want.

This commit is contained in:
Mark McDowall
2011-04-27 17:11:08 -07:00
parent de003b9774
commit 7e946277bb
8 changed files with 52 additions and 4 deletions
@@ -49,7 +49,6 @@ namespace NzbDrone.Core.Providers.Indexer
/// </summary>
protected abstract string[] Urls { get; }
/// <summary>
/// Gets the credential.
/// </summary>
@@ -58,7 +57,6 @@ namespace NzbDrone.Core.Providers.Indexer
get { return null; }
}
public IndexerSetting Settings
{
get
@@ -189,7 +187,8 @@ namespace NzbDrone.Core.Providers.Indexer
EpisodeId = episode.EpisodeId,
IsProper = parseResult.Proper,
NzbTitle = feedItem.Title.Text,
Quality = parseResult.Quality
Quality = parseResult.Quality,
Indexer = GetIndexerType()
});
}
}
@@ -246,6 +245,15 @@ namespace NzbDrone.Core.Providers.Indexer
/// <returns>Download link URL</returns>
protected abstract string NzbDownloadUrl(SyndicationItem item);
/// <summary>
/// Gets he IndexerType Enum for this indexer
/// </summary>
/// <returns>IndexerType Enum</returns>
protected virtual IndexerType GetIndexerType()
{
return IndexerType.Other;
}
private bool InHistory(IList<Episode> episodes, EpisodeParseResult parseResult, SyndicationItem feedItem)
{
foreach (var episode in episodes)