1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-23 08:15:27 +00:00
Sonarr/NzbDrone.Core/Providers/TvDbProvider.cs

33 lines
848 B
C#
Raw Normal View History

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