Skip to content

Commit

Permalink
wait until add-on settings window is closed before running the daemon (
Browse files Browse the repository at this point in the history
  • Loading branch information
elgatito authored and scakemyer committed Apr 12, 2017
1 parent 5d7991a commit 7585380
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions resources/site-packages/quasar/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ def start_quasard(**kwargs):
kwargs["env"] = env
kwargs["close_fds"] = True

wait_counter = 1
while xbmc.getCondVisibility('Window.IsVisible(10140)'):
if wait_counter == 1:
log.info('Add-on settings currently opened, waiting before starting...')
if wait_counter > 300:
break
time.sleep(1)

return subprocess.Popen(args, **kwargs)

def shutdown():
Expand Down

0 comments on commit 7585380

Please sign in to comment.