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