private async Task<bool> GetSeasons() { try { var query = new SeasonQuery { UserId = AuthenticationService.Current.LoggedInUserId, SeriesId = SelectedTvSeries.Id, Fields = new[] { ItemFields.ParentId, ItemFields.MediaSources, ItemFields.SyncInfo }, IsMissing = App.SpecificSettings.ShowMissingEpisodes, IsVirtualUnaired = App.SpecificSettings.ShowUnairedEpisodes }; Log.Info("Getting seasons for TV Show [{0}] ({1})", SelectedTvSeries.Name, SelectedTvSeries.Id); var seasons = await ApiClient.GetSeasonsAsync(query); Seasons = seasons.Items.OrderBy(x => x.IndexNumber).ToList(); return true; } catch (HttpException ex) { Utils.HandleHttpException("GetSeasons()", ex, NavigationService, Log); App.ShowMessage(AppResources.ErrorSeasons); return false; } }
private Task<ItemsResult> GetSeasons(ItemListViewModel viewModel) { var item = ItemViewModel.Item; var query = new SeasonQuery { UserId = _sessionManager.LocalUserId, Fields = new[] { ItemFields.PrimaryImageAspectRatio, ItemFields.DateCreated, ItemFields.Overview }, SeriesId = item.Id }; return _apiClient.GetSeasonsAsync(query, CancellationToken.None); }
private Task<ItemsResult> GetSeasons(ItemListViewModel viewModel) { var item = ItemViewModel.Item; var query = new SeasonQuery { UserId = _sessionManager.CurrentUser.Id, Fields = new[] { ItemFields.PrimaryImageAspectRatio, ItemFields.DateCreated, ItemFields.Overview }, SeriesId = item.Id, IsSpecialSeason = false }; return _apiClient.GetSeasonsAsync(query); }