// GET: /Action/RecycleApp public ActionResult RecycleApp() { Spotify.ExitPlayer(); HttpRuntime.UnloadAppDomain(); return(Content("")); }
/// <summary> /// Exit all running programmes /// </summary> /// <param name="keepScreen"></param> /// <returns></returns> public static bool ExitAllPrograms( bool keepScreen = false) { logger.Info("ExitAllPrograms"); lastActive = DateTime.UtcNow; if (spotifyRunning) { Spotify.ExitPlayer(); spotifyRunning = false; } if (runningProgram == "Music" || runningProgram == "Photo") { ExitJRMC(); } if (runningProgram == "Sky") { DesktopClient.SendIR(IRCodes.Codes["Sky.PowerSTB"], "Sky.PowerSTB"); Receiver.SelectComputerInput(); } if (runningProgram == "Roku") { Roku.KeyPress("Home"); Receiver.SelectComputerInput(); } if (!keepScreen) { Receiver.TurnOff(); Screen.SetScreenDisplayMode(0); } else { Screen.EnsureScreenOn(); Receiver.SelectTVOutput(); } bool ok = DesktopClient.ExitAllPrograms(); NothingRunning(); return(ok); }