public override async void OnNavigatedTo(object navigationParameter, NavigationMode navigationMode, Dictionary <string, object> viewModelState)
        {
            dynamic parameters   = navigationParameter;
            var     seasonNumber = (int)parameters.season;

            showId = (int)parameters.showId;

            var traktSeasons = await traktService.GetSeasonsAsync(showId, extended : TraktExtendEnum.FULL_IMAGES);

            Season = (from traktseason in traktSeasons
                      where traktseason.Number == seasonNumber
                      select traktseason).Single();

            Number   = Season.Number;
            Poster   = Season.Images.Poster.Full;
            Overview = Season.Overview;
            Episodes = new ObservableCollection <TraktEpisode>(from episode in await traktService.GetSeasonEpisodesAsync(showId, seasonNumber, extended: TraktExtendEnum.IMAGES)
                                                               orderby episode.Number
                                                               select episode);
        }
Beispiel #2
0
        public override async void OnNavigatedTo(object navigationParameter, NavigationMode navigationMode, Dictionary <string, object> viewModelState)
        {
            var showId = (int)navigationParameter;

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

            Title    = Show.Title;
            Poster   = Show.Images.Poster.Full;
            Overview = Show.Overview;
            Rating   = Show.Rating;

            Progress = await traktService.GetShowWatchedProgressAsync(Show.Ids.Trakt, extended : TraktExtendEnum.IMAGES);

            Seasons = new ObservableCollection <TraktSeason>(from season in await traktService.GetSeasonsAsync(Show.Ids.Trakt, extended: TraktExtendEnum.IMAGES)
                                                             orderby season.Number descending
                                                             select season);

            Comments = new ObservableCollection <TraktComment>(await traktService.GetShowCommentsAsync(Show.Ids.Trakt));

            Related = new ObservableCollection <TraktTVShow>(await traktService.GetRelatedShowsAsync(Show.Ids.Trakt, extended: TraktExtendEnum.IMAGES));
        }