Esempio n. 1
0
        public static string GetTimeLeft(EpisodeJson episodeJson, IList <Season> seasonList)
        {
            var lastSeason = seasonList.LastOrDefault();

            if (lastSeason == null)
            {
                return(empty);
            }

            var lastIndex = lastSeason.EpisodeList.Count - 1;

            while (lastIndex >= 0)
            {
                var episode = lastSeason.EpisodeList[lastIndex];

                var seasonId  = episode.Season.ID;
                var episodeId = episode.ID;
                episode = episodeJson.GetEpisode(seasonId, episodeId);

                if (episode != null && isComplete(episode))
                {
                    return(getTimeLeft(seasonId, episodeId));
                }

                lastIndex--;
            }

            return(empty);
        }
Esempio n. 2
0
        public BaseModel()
        {
            LogOn = new LogOnModel();

            episodeJson = new EpisodeJson();

            var jsonPath = episodeJson.PathJson;

            var cssPath = Path.Combine(
                Directory.GetCurrentDirectory(),
                "Assets",
                "css"
                );

            Paths = new Paths(jsonPath, cssPath);

            Menu = new MenuModel(Paths.Json);
            Css  = new CssModel(Paths.Css);
        }
Esempio n. 3
0
        public static Episode ToEpisode(this EpisodeJson f)
        {
            Episode NewEpisode = new Episode(f.EpisodeNumber, f.Title, f.Affiche, f.Desc, f.Real, f.Date);

            return(NewEpisode);
        }
Esempio n. 4
0
        public static EpisodeJson ToJsonEpisode(this Episode e)
        {
            EpisodeJson NewEpisode = new EpisodeJson(e.Title, e.Affiche, e.Desc, e.Real, e.Date, e.EpisodeNumber);

            return(NewEpisode);
        }