/// <summary> /// Initializes the library. Needs to be called at first. /// </summary> /// <returns></returns> public bool Init() { ICacheProvider cacheProvider = new XmlCacheProvider(SeriesTvDbMatcher.CACHE_PATH); _tvdbHandler = new TvdbHandler(cacheProvider, "9628A4332A8F3487"); _tvdbHandler.InitCache(); if (!_tvdbHandler.IsLanguagesCached) { _tvdbHandler.ReloadLanguages(); } return(true); }
/// <summary> /// Initializes the library. Needs to be called at first. /// </summary> /// <returns></returns> public bool Init(string cachePath, bool useHttps) { ICacheProvider cacheProvider = new XmlCacheProvider(cachePath); _tvdbHandler = new TvdbHandler("9628A4332A8F3487", useHttps, cacheProvider); _tvdbHandler.InitCache(); if (!_tvdbHandler.IsLanguagesCached) { _tvdbHandler.ReloadLanguages(); } _tvdbHandler.UpdateFinished += TvdbHandlerOnUpdateFinished; _tvdbHandler.UpdateProgressed += TvdbHandlerOnUpdateProgressed; SetDefaultLanguage(TvdbLanguage.DefaultLanguage); SetCachePath(cachePath); _seriesToActorMap = new IdMapper(Path.Combine(cachePath, "SeriesToActorMap.xml")); return(true); }