// GET: /Action/StartSky public ActionResult StartSky( string mode) { bool isAlreadyRunningSky = Running.RunningProgram == "Sky"; if (mode != "radio") { Screen.EnsureScreenOn(); } else if (!isAlreadyRunningSky) { Screen.SetScreenDisplayMode(0); } Running.StartSky(); Receiver.SelectSkyInput(); if (mode == "radio") { Receiver.SelectRoomsOutput(); } else { Receiver.SelectTVOutput(null, false); } if (!isAlreadyRunningSky) { Receiver.SetMute(true); } DesktopClient.SendIR(IRCodes.Codes["Sky.Watch"], "Sky.Watch"); if (!isAlreadyRunningSky) { System.Threading.Thread.Sleep(2000); SkyData.Sky.ChangeChannel(0); } switch (mode) { case "planner": return(Content("/Sky/Recordings")); case "live": return(Content("/Sky/Live")); case "radio": return(Content("/Sky/Radio")); } return(Content("/Sky/Watch")); }