1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-10 13:02:47 +01:00
Radarr/NzbDrone.Core/Controllers/TvDbController.cs

33 lines
856 B
C#
Raw Normal View History

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