Try to prevent sleep from happening
This commit is contained in:
parent
47ad159a5f
commit
065169aa31
1 changed files with 5 additions and 1 deletions
|
@ -359,6 +359,8 @@ class LibrarySync(Thread):
|
||||||
# Only run once when first setting up. Can be run manually.
|
# Only run once when first setting up. Can be run manually.
|
||||||
self.compare = manualrun or repair
|
self.compare = manualrun or repair
|
||||||
|
|
||||||
|
xbmc.executebuiltin('InhibitIdleShutdown(true)')
|
||||||
|
|
||||||
# Add sources
|
# Add sources
|
||||||
utils.sourcesXML()
|
utils.sourcesXML()
|
||||||
|
|
||||||
|
@ -382,6 +384,7 @@ class LibrarySync(Thread):
|
||||||
startTime = datetime.now()
|
startTime = datetime.now()
|
||||||
completed = process[itemtype]()
|
completed = process[itemtype]()
|
||||||
if not completed:
|
if not completed:
|
||||||
|
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
elapsedTime = datetime.now() - startTime
|
elapsedTime = datetime.now() - startTime
|
||||||
|
@ -397,6 +400,7 @@ class LibrarySync(Thread):
|
||||||
self.showKodiNote("Sync completed in: %s"
|
self.showKodiNote("Sync completed in: %s"
|
||||||
% (str(elapsedtotal).split('.')[0]))
|
% (str(elapsedtotal).split('.')[0]))
|
||||||
|
|
||||||
|
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def processView(self, folderItem, kodi_db, emby_db, totalnodes):
|
def processView(self, folderItem, kodi_db, emby_db, totalnodes):
|
||||||
|
@ -1114,7 +1118,7 @@ class LibrarySync(Thread):
|
||||||
utils.reset()
|
utils.reset()
|
||||||
|
|
||||||
if not startupComplete:
|
if not startupComplete:
|
||||||
# Also runs when installed first
|
# Also runs when first installed
|
||||||
# Verify the video database can be found
|
# Verify the video database can be found
|
||||||
videoDb = utils.getKodiVideoDBPath()
|
videoDb = utils.getKodiVideoDBPath()
|
||||||
if not xbmcvfs.exists(videoDb):
|
if not xbmcvfs.exists(videoDb):
|
||||||
|
|
Loading…
Reference in a new issue