async Task LoadTVShowSeason(int tv_id, int season_number, string showName)
        {
            Item = await Task.Run(() => TMDbService.GetDetailedTVShowSeasonAsync(tv_id, season_number, showName));

            Item.poster_path = "";

            PosterSource.Clear();
            foreach (var posterItem in Item.images.posters)
            {
                PosterSource.Add(posterItem);
            }

            CastSource.Clear();
            foreach (var castItem in Item.credits.cast)
            {
                CastSource.Add(castItem);
            }

            CrewSource.Clear();
            foreach (var crewItem in Item.credits.crew)
            {
                CrewSource.Add(crewItem);
            }

            EpisodeSource.Clear();
            foreach (var episodeItem in Item.episodes)
            {
                EpisodeSource.Add(episodeItem);
            }

            LoadCompleted();
        }
示例#2
0
        async Task LoadMovie(int id)
        {
            Item = await TMDbService.GetDetailedFilmAsync(id);

            Item.poster_path   = "";
            Item.backdrop_path = "";

            PosterSource.Clear();
            foreach (var posterItem in Item.images.posters)
            {
                PosterSource.Add(posterItem);
            }

            BackdropSource.Clear();
            foreach (var backdropItem in Item.images.backdrops)
            {
                BackdropSource.Add(backdropItem);
            }

            ReviewSource.Clear();
            foreach (var reviewItem in Item.reviews.results)
            {
                ReviewSource.Add(reviewItem);
            }

            CollectionSource.Clear();
            if (Item.belongs_to_collection != null && Item.collection_films != null)
            {
                foreach (var collectionItem in Item.collection_films)
                {
                    CollectionSource.Add(collectionItem);
                }
            }

            RecommendationsSource.Clear();
            foreach (var recommendationItem in Item.recommendations.results)
            {
                RecommendationsSource.Add(recommendationItem);
            }

            CastSource.Clear();
            foreach (var castItem in Item.credits.cast)
            {
                CastSource.Add(castItem);
            }

            CrewSource.Clear();
            foreach (var crewItem in Item.credits.crew)
            {
                CrewSource.Add(crewItem);
            }

            LoadCompleted();
        }
        async Task LoadTVShow(int id)
        {
            Item = await Task.Run(() => TMDbService.GetDetailedTVShowAsync(id));

            Item.poster_path   = "";
            Item.backdrop_path = "";

            PosterSource.Clear();
            foreach (var posterItem in Item.images.posters)
            {
                PosterSource.Add(posterItem);
            }

            BackdropSource.Clear();
            foreach (var backdropItem in Item.images.backdrops)
            {
                BackdropSource.Add(backdropItem);
            }

            ReviewSource.Clear();
            foreach (var reviewItem in Item.reviews.results)
            {
                ReviewSource.Add(reviewItem);
            }

            RecommendationsSource.Clear();
            foreach (var recommendationItem in Item.recommendations.results)
            {
                RecommendationsSource.Add(recommendationItem);
            }

            CastSource.Clear();
            foreach (var castItem in Item.credits.cast)
            {
                CastSource.Add(castItem);
            }

            CrewSource.Clear();
            foreach (var crewItem in Item.credits.crew)
            {
                CrewSource.Add(crewItem);
            }

            SeasonSource.Clear();
            foreach (var seasonItem in Item.seasons)
            {
                SeasonSource.Add(seasonItem);
            }

            LoadCompleted();
        }
        async Task LoadPerson(int id)
        {
            Item = await Task.Run(() => TMDbService.GetDetailedPersonAsync(id));

            Item.profile_path = "";

            ProfilesSource.Clear();
            foreach (var imageItem in Item.images.profiles)
            {
                ProfilesSource.Add(imageItem);
            }

            TaggedImagesSource.Clear();
            foreach (var taggedImageItem in Item.tagged_images.results)
            {
                TaggedImagesSource.Add(taggedImageItem);
            }

            CastSource.Clear();
            foreach (var castItem in Item.combined_credits.cast)
            {
                CastSource.Add(castItem);
            }

            CrewSource.Clear();
            foreach (var crewItem in Item.combined_credits.crew)
            {
                CrewSource.Add(crewItem);
            }

            PermanentCast.Clear();
            foreach (var permCastItem in CastSource)
            {
                PermanentCast.Add(permCastItem);
            }

            PermanentCrew.Clear();
            foreach (var permCrewItem in CrewSource)
            {
                PermanentCrew.Add(permCrewItem);
            }

            LoadCompleted();
        }