Ejemplo n.º 1
0
        public async Task <Result> Stop()
        {
            var result = await _playerService.StopTcp();

            PushNotification("Stop Tcp");
            return(result);
        }
Ejemplo n.º 2
0
        public async Task Stop()
        {
            var powerStatus = await YamahaService.PowerStatus();

            var smartHouseState = await SmartHouseService.GetCurrentState();

            if (powerStatus == PowerStatusEnum.StandBy)
            {
                PushNotification("Smarthouse is turn off");
                return;
            }

            if (smartHouseState == SmartHouseState.Pandora)
            {
                await PlayerService.StopTcp();

                PushNotification("Pianobar has exited");
            }
            else if (smartHouseState == SmartHouseState.Music)
            {
                MpdService.Stop();
            }
            else if (smartHouseState == SmartHouseState.TV)
            {
                await TVService.Stop();
            }
        }