public ActionResult Index()
        {
            var fileName = Stellaris.GetMostRecentSaves(saveGamesPath, 1).FirstOrDefault();

            var model = new StellarisLedger.Models.PlanetsIndexViewModel();

            model.LatestSaveGamesPath = fileName;

            Lazy <Analyst> analyst = new Lazy <Analyst>(() =>
            {
                var content = Stellaris.GetGameSaveContent(Path.Combine(saveGamesPath, fileName));
                return(new Analyst(content));
            });

            model.IsMachineEmpire = memoryCache.GetOrUpdateTag0IsMachineEmpire(false, () => analyst.Value.GetCountry(0).IsMachineEmpire, () => analyst.Value.GetInGameDate());

            return(View(model));
        }
 public IEnumerable <string> GetMostRecentSaves([FromQuery] int?limit = null)
 {
     return(Stellaris.GetMostRecentSaves(saveGamesPath, limit));
 }