Exemplo n.º 1
0
        public async Task <TraktEpisode> getEpisodeByTvdbAndSeasonInfo(String tvdbId, String season, String episode, TraktShow show)
        {
            if (show.Seasons.Count == 0)
            {
                ShowController showController = new ShowController();
                TraktSeason[]  seasons        = await showController.getSeasonsByTVDBID(tvdbId);

                foreach (TraktSeason traktSeason in seasons)
                {
                    traktSeason.SeasonEpisodes = new EntitySet <TraktEpisode>();
                }

                showController.AddSeasonsToShow(show, seasons);
            }

            return(await showDao.getEpisodeByTvdbAndSeasonInfo(tvdbId, season, episode));
        }
Exemplo n.º 2
0
        private async Task <Boolean> DownloadRequiredWallpapers(TraktCalendar[] cal)
        {
            foreach (TraktCalendar calendarItem in cal)
            {
                foreach (TraktCalendarEpisode calEpisode in calendarItem.Episodes)
                {
                    String fileName = calEpisode.Show.tvdb_id + "background" + ".jpg";

                    if (!StorageController.doesFileExist(fileName))
                    {
                        if (StorageController.IsConnectedToWifi())
                        {
                            await ShowController.getFanart(calEpisode.Show.tvdb_id, calEpisode.Show.Images.Fanart);
                        }
                    }
                }
            }

            return(true);
        }