Ejemplo n.º 1
0
        public override async Task RunJobAsync()
        {
            var result = _mediaServerService.PingMediaServer(Settings.MediaServer.FullMediaServerAddress);

            await LogProgress(50);

            if (result)
            {
                await LogInformation("We found your MediaServer server");

                _mediaServerService.ResetMissedPings();
            }
            else
            {
                await LogInformation("We could not ping your MediaServer server. Might be because it's turned off or dns is wrong");

                _mediaServerService.IncreaseMissedPings();
            }

            var status = _mediaServerService.GetMediaServerStatus();
            await HubHelper.BroadcastEmbyConnectionStatus(status.MissedPings);
        }
Ejemplo n.º 2
0
        public IActionResult GetMediaServerStatus()
        {
            var result = _mediaServerService.GetMediaServerStatus();

            return(Ok(_mapper.Map <EmbyStatusViewModel>(result)));
        }