public async Task <IActionResult> Index(bool?disableCache, bool?demoOnAir) { var liveShowDetails = await _liveShowDetails.LoadAsync(); var showList = await _showsService.GetRecordedShowsAsync(User, disableCache ?? false); if (demoOnAir == true) { liveShowDetails = new LiveShowDetails(); liveShowDetails.LiveShowEmbedUrl = "tbd"; } if (!string.IsNullOrWhiteSpace(liveShowDetails.LiveShowRedirectUrl)) { return(Redirect(liveShowDetails.LiveShowRedirectUrl)); } return(View(new HomeViewModel { AdminMessage = liveShowDetails?.AdminMessage, NextShowDateUtc = liveShowDetails?.NextShowDateUtc, LiveShowEmbedUrl = liveShowDetails?.LiveShowEmbedUrl, LiveShowRedirectUrl = liveShowDetails?.LiveShowRedirectUrl?.Trim(), PreviousShows = showList.Shows, MoreShowsUrl = showList.MoreShowsUrl })); }
public async Task OnGetAsync(bool?disableCache) { var liveShowDetails = await _liveShowDetails.LoadAsync(); var showList = await _showsService.GetRecordedShowsAsync(User, disableCache ?? false); _mapper.Map(liveShowDetails, this); _mapper.Map(showList, this); }
public async Task OnGetAsync(bool?disableCache) { var liveShowDetails = await _liveShowDetails.LoadAsync(); string playlist = _appSettings.YouTubeCastPlaylistId; var showList = await _showsService.GetRecordedShowsAsync(User, disableCache ?? false, playlist); _mapper.Map(liveShowDetails, this); _mapper.Map(showList, this); }
public async Task <IActionResult> Index(bool?disableCache) { var liveShowDetails = await _liveShowDetails.LoadAsync(); var showList = await _showsService.GetRecordedShowsAsync(User, disableCache ?? false); var homeViewModel = new HomeViewModel(); _mapper.Map(liveShowDetails, homeViewModel); _mapper.Map(showList, homeViewModel); return(View(homeViewModel)); }
public async Task <IActionResult> Index(bool?disableCache) { var liveShowDetails = await _liveShowDetails.LoadAsync(); // AzureStorage var showList = await _showsService.GetRecordedShowsAsync(User, disableCache ?? false); // Youtube Playlist return(View(new HomeViewModel { AdminMessage = liveShowDetails?.AdminMessage, NextShowDateUtc = liveShowDetails?.NextShowDateUtc, LiveShowEmbedUrl = liveShowDetails?.LiveShowEmbedUrl, PreviousShows = showList.Shows, MoreShowsUrl = showList.MoreShowsUrl })); }
public async Task <IActionResult> Index(bool?disableCache) { var meetupsToDisplay = 3; var liveShowDetails = await _liveShowDetails.LoadAsync(); var showList = await _showsService.GetRecordedShowsAsync(User, disableCache ?? false); return(View(new MeetupViewModel { AdminMessage = liveShowDetails?.AdminMessage, NextShowDateUtc = liveShowDetails?.NextShowDateUtc, LiveShowEmbedUrl = liveShowDetails?.LiveShowEmbedUrl, LiveShowHtml = liveShowDetails?.LiveShowHtml, PreviousShows = showList.Shows.Take(meetupsToDisplay).ToArray(), MoreShowsUrl = showList.MoreShowsUrl })); }