Skip to content

Commit

Permalink
Added setting for delaying binary startup on Kodi start.
Browse files Browse the repository at this point in the history
  • Loading branch information
elgatito committed Jul 16, 2021
1 parent 2050abf commit a6b32e8
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/language/Croatian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2108,3 +2108,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Dutch/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2104,3 +2104,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Finnish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2104,3 +2104,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/French/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2114,3 +2114,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/German/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2108,3 +2108,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Greek/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2108,3 +2108,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Hebrew/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2109,3 +2109,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Hungarian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2106,3 +2106,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Italian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Portuguese (Brazil)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2104,3 +2104,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Portuguese/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2104,3 +2104,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Romanian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2108,3 +2108,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Russian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,7 @@ msgstr "Отмет. просм. в Trakt"
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr "Отмет. непросм. в Trakt"

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr "Отсрочка запуска дополнения, секунд"
4 changes: 4 additions & 0 deletions resources/language/Slovak/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Spanish (Argentina)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,7 @@ msgstr "Marcar como visto en Trakt"
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr "Marcar como no visto en Trakt"

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Spanish (Mexico)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2104,3 +2104,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Spanish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Swedish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2108,3 +2108,7 @@ msgstr "Markera som sedd i Trakt"
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr "Markera som osedd i Trakt"

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/Ukrainian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,7 @@ msgstr "Позначати як переглянуте в Trakt"
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr "Позначати як непереглянуте в Trakt"

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
4 changes: 4 additions & 0 deletions resources/language/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2116,3 +2116,7 @@ msgstr ""
msgctxt "#30668"
msgid "Mark as unwatched in Trakt"
msgstr ""

msgctxt "#30669"
msgid "Delay addon startup, seconds"
msgstr ""
1 change: 1 addition & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- Startup -->
<setting label="30603" type="lsep" />
<setting id="greeting_enabled" label="30587" type="bool" default="true" />
<setting id="startup_delay" label="30669" type="slider" option="int" range="0,1,180" default="0" />
<setting id="preload_timeout" label="30602" type="slider" option="int" range="1,1,120" default="1" />
<setting id="binary_platform" label="30611" type="select" values="Auto|android_arm|android_arm64|android_x86|android_x64|linux_armv6|linux_armv7|linux_arm64|linux_x86|linux_x64|darwin_x86|darwin_x64|windows_x86|windows_x64" default="Auto" />
<setting type="action" label="30620" option="close" action="RunPlugin(plugin://plugin.video.elementum/restart/)" />
Expand Down
4 changes: 4 additions & 0 deletions resources/site-packages/elementum/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ def start_elementumd(**kwargs):
wait_counter += 1

log.info("elementumd: start args: %s, kw: %s" % (args, kwargs))
delay = int(ADDON.getSetting("startup_delay"))
if delay > 0:
log.info("elementumd: sleeping %d seconds before startup" % (delay))
time.sleep(delay)

if hasSubprocess:
return subprocess.Popen(args, **kwargs)
Expand Down

0 comments on commit a6b32e8

Please sign in to comment.