Skip to content

Commit

Permalink
Work around deadlock when calling xbmc.executebuildin(Reboot)
Browse files Browse the repository at this point in the history
  • Loading branch information
mglae committed Jan 5, 2021
1 parent 9557255 commit e7a82d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions resources/lib/modules/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,15 @@ def reset_xbmc(self, listItem=None):
open(self.XBMC_RESET_FILE, 'a').close()
oe.winOeMain.close()
oe.xbmcm.waitForAbort(1)
xbmc.executebuiltin('Reboot')
oe.execute('/usr/bin/systemctl --no-block reboot')

@log.log_function()
def reset_oe(self, listItem=None):
if self.ask_sure_reset('Hard') == 1:
open(self.LIBREELEC_RESET_FILE, 'a').close()
oe.winOeMain.close()
oe.xbmcm.waitForAbort(1)
xbmc.executebuiltin('Reboot')
oe.execute('/usr/bin/systemctl --no-block reboot')

@log.log_function()
def ask_sure_reset(self, part):
Expand Down Expand Up @@ -492,7 +492,7 @@ def do_restore(self, listItem=None):
if oe.reboot_counter(10, oe._(32371)) == 1:
oe.winOeMain.close()
oe.xbmcm.waitForAbort(1)
xbmc.executebuiltin('Reboot')
oe.execute('/usr/bin/systemctl --no-block reboot')
else:
log.log('User Abort!')
oe.execute(f'rm -rf {self.RESTORE_DIR}')
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/modules/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def do_autoupdate(self, listItem=None, silent=False):
if silent == False:
oe.winOeMain.close()
oe.xbmcm.waitForAbort(1)
xbmc.executebuiltin('Reboot')
oe.execute('/usr/bin/systemctl --no-block reboot')
else:
delattr(self, 'update_in_progress')

Expand Down

0 comments on commit e7a82d8

Please sign in to comment.