async Task LoadInfo() { Show = await Task.Run(() => TMDBService.GetShow(Id)); Season = await Task.Run(() => TMDBService.GetSeason(Id, SeasonNumber)); foreach (var v in Season.credits.cast.OrderBy(x => x.order).ToList().ImagesFirst()) { Cast.Add(v); } foreach (var v in Season.credits.crew.ImagesFirst()) { if (!Crew.Any(x => x.id == v.id)) { Crew.Add(v); } else { Crew.Single(x => x.id == v.id).job += $", {v.job}"; } } foreach (var v in Season.episodes) { if (v.still_path != null) { Backdrops.Add(new Image() { file_path = v.still_path }); } } Console.WriteLine(); }
async Task LoadInfo() { Show = await Task.Run(() => TMDBService.GetShow(Id)); foreach (var v in Show.credits.cast.OrderBy(x => x.order).ToList().ImagesFirst()) { Cast.Add(v); } foreach (var v in Show.credits.crew.ImagesFirst()) { if (!Crew.Any(x => x.id == v.id)) { Crew.Add(v); } else { Crew.Single(x => x.id == v.id).job += $", {v.job}"; } } foreach (var v in Show.seasons) { if (v.season_number == 0) { Show.seasons.Add(v); Show.seasons.Remove(v); break; } } }