mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Initial Commit
This commit is contained in:
commit
74ac3bb599
106 changed files with 118079 additions and 0 deletions
33
NzbDrone.Core/Controllers/TvDbController.cs
Normal file
33
NzbDrone.Core/Controllers/TvDbController.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
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()
|
||||
{
|
||||
_handler = new TvdbHandler(new XmlCacheProvider(Path.Combine(Main.AppPath, @"\tvdbcache.xml")), TvDbApiKey);
|
||||
}
|
||||
|
||||
#region ITvDbController Members
|
||||
|
||||
public List<TvdbSearchResult> SearchSeries(string name)
|
||||
{
|
||||
return _handler.SearchSeries(name);
|
||||
}
|
||||
|
||||
public TvdbSeries GetSeries(int id, TvdbLanguage language)
|
||||
{
|
||||
return _handler.GetSeries(id, language, true, false, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue