//Player Methods public async Task <ActionResult> PlayNextTrack() { try { var tokenGiven = _cookiesManager.GetCookie("TokenGiven", Request); var tokenTimes = _cookiesManager.GetCookie("TokenTime", Request); if (tokenGiven != null && tokenTimes != null) { if (ApiClientConfig.IsIfTokenExpired(Convert.ToDateTime(tokenTimes.Value), tokenGiven.Value)) { return(RedirectToAction("LoginUser")); } } else { return(RedirectToAction("LoginUser")); } client = ApiClientConfig.GetClientInstance(tokenGiven.Value); var trySkipNext = await _playerRepo.SkipNextItem(client); var modelValues = await GetPrivateUserDefaultModel(client); var m = trySkipNext; _model = modelValues; return(RedirectToAction("Index")); } catch (Exception ex) { ModelState.AddModelError(string.Empty, ex.Message); return(View(ERROR_MESSAGE_PATH)); } }