1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00
Sonarr/NzbDrone.Core/Providers/TvDbProvider.cs

33 lines
846 B
C#
Raw Normal View History

2010-09-23 06:19:47 +03:00
using System.Collections.Generic;
using System.IO;
using TvdbLib;
using TvdbLib.Cache;
using TvdbLib.Data;
namespace NzbDrone.Core.Providers
2010-09-23 06:19:47 +03:00
{
public class TvDbProvider : ITvDbProvider
2010-09-23 06:19:47 +03:00
{
private const string TvDbApiKey = "5D2D188E86E07F4F";
private readonly TvdbHandler _handler;
public TvDbProvider()
2010-09-23 06:19:47 +03:00
{
2010-09-24 10:24:05 +03:00
_handler = new TvdbHandler(new XmlCacheProvider(Path.Combine(Main.AppPath, @"cache\tvdbcache.xml")), TvDbApiKey);
2010-09-23 06:19:47 +03:00
}
#region ITvDbProvider Members
2010-09-23 06:19:47 +03:00
2010-09-28 03:27:02 +03:00
public IList<TvdbSearchResult> SearchSeries(string name)
2010-09-23 06:19:47 +03:00
{
return _handler.SearchSeries(name);
}
public TvdbSeries GetSeries(int id, TvdbLanguage language)
{
return _handler.GetSeries(id, language, true, false, false);
}
#endregion
}
}