Esempio n. 1
0
        public override async void OnNavigatedTo(object navigationParameter, NavigationMode navigationMode, Dictionary <string, object> viewModelState)
        {
            dynamic parameters    = navigationParameter;
            var     seasonNumber  = (int)parameters.season;
            var     showId        = (int)parameters.showId;
            var     episodeNumber = (int)parameters.episode;

            Episode = await traktService.GetEpisodeAsync(showId, seasonNumber, episodeNumber, extended : TraktExtendEnum.FULL_IMAGES);

            Show = await traktService.GetShowAsync(showId, extended : TraktExtendEnum.MIN);

            Number   = Episode.Number;
            Title    = Episode.Title;
            Overview = Episode.Overview;
            Screen   = Episode.Images.Screenshot.Full;
            AirDate  = DateTime.Parse(Episode.First_Aired, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);

            Comments = new ObservableCollection <TraktComment>(await traktService.GetEpisodeCommentsAsync(showId, seasonNumber, episodeNumber));

            try
            {
                Link = await crawlerService.GetLink(Show.Title, Episode.Season, Episode.Number);
            }
            catch
            {
            }
        }