public string GetServerTime(CancellationToken cancellationToken)
 {
     try
     {
         var provider = new TheTvDbProvider(_zipClient, _httpClient, _fileSystem, _serverApplicationPaths);
         return(provider.GetServerTime(cancellationToken).Result);
     }
     catch (Exception)
     {
         return(null);
     }
 }
 public IEnumerable <string> GetShowsToUpdate(IEnumerable <string> showIds, string time, CancellationToken cancellationToken)
 {
     try
     {
         var provider = new TheTvDbProvider(_zipClient, _httpClient, _fileSystem, _serverApplicationPaths);
         return(provider.GetSeriesIdsToUpdate(showIds, time, cancellationToken).Result);
     }
     catch (Exception)
     {
         IsCalculationFailed = true;
         return(null);
     }
 }
        public List <UpdateShowModel> CalculateTotalEpisodes(IEnumerable <string> showIds, CancellationToken cancellationToken)
        {
            var result   = new List <UpdateShowModel>();
            var provider = new TheTvDbProvider(_zipClient, _httpClient, _fileSystem, _serverApplicationPaths);

            try
            {
                foreach (var showId in showIds)
                {
                    var total = provider.CalculateEpisodeCount(showId, "en", cancellationToken).Result;
                    result.Add(new UpdateShowModel(showId, total));
                }
            }
            catch (Exception)
            {
                IsCalculationFailed = true;
            }

            return(result);
        }