mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +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
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ from utils import settings
|
||||||
|
|
||||||
loghandler.config()
|
loghandler.config()
|
||||||
log = logging.getLogger("EMBY.service")
|
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)
|
log.warn("Delaying emby startup by: %s sec...", DELAY)
|
||||||
|
|
||||||
try:
|
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")
|
raise RuntimeError("Abort event while waiting to start Emby for kodi")
|
||||||
# Start the service
|
# Start the service
|
||||||
Service().service_entry_point()
|
Service().service_entry_point()
|
||||||
|
|
Loading…
Reference in a new issue