mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-23 21:39:54 +00:00
Prevent potential crash with delay settings
If value is erased or missing, default to 0
This commit is contained in:
parent
a58503c264
commit
84358adc4b
@ -26,7 +26,7 @@ from utils import settings
|
||||
|
||||
loghandler.config()
|
||||
log = logging.getLogger("EMBY.service")
|
||||
DELAY = int(settings('startupDelay'))
|
||||
DELAY = settings('startupDelay') or 0
|
||||
|
||||
#################################################################################################
|
||||
|
||||
@ -35,7 +35,7 @@ if __name__ == "__main__":
|
||||
log.warn("Delaying emby startup by: %s sec...", DELAY)
|
||||
|
||||
try:
|
||||
if DELAY and xbmc.Monitor().waitForAbort(DELAY):
|
||||
if DELAY and xbmc.Monitor().waitForAbort(int(DELAY)):
|
||||
raise RuntimeError("Abort event while waiting to start Emby for kodi")
|
||||
# Start the service
|
||||
Service().service_entry_point()
|
||||
|
Loading…
Reference in New Issue
Block a user