diff --git a/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py b/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py index 9410f48..930d601 100644 --- a/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py +++ b/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py @@ -2,6 +2,7 @@ import subprocess import threading import os +import sys import xbmc from resources.lib.di.requiredfeature import RequiredFeature @@ -16,7 +17,7 @@ def __init__(self, crypto_provider): def pair(self, nvhttp, server_info, dialog): self.logger.info('[MoonlightHelper] - Attempting to pair host: ' + self.config_helper.host_ip) - pairing_proc = subprocess.Popen(["expect_unbuffer", "moonlight", "pair"], cwd="/storage/moonlight", env={'LD_LIBRARY_PATH': '/storage/moonlight'}, shell=False, stdout=subprocess.PIPE, preexec_fn=os.setsid) + pairing_proc = subprocess.Popen(["moonlight", "pair"], cwd="/storage/moonlight", env={'LD_LIBRARY_PATH': '/storage/moonlight'}, shell=False, stdout=subprocess.PIPE, preexec_fn=os.setsid) lines_iterator = iter(pairing_proc.stdout.readline, b"") pairing_thread = threading.Thread(target=self.loop_lines, args=(self.logger, lines_iterator, dialog)) @@ -24,6 +25,7 @@ def pair(self, nvhttp, server_info, dialog): while True: xbmc.sleep(1000) + sys.stdout.flush() if not pairing_thread.isAlive(): break