From 44722d1350376274b3f71f6efd44ceb23daf0dbd Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sun, 26 Feb 2023 20:07:20 +0100 Subject: [PATCH] Try to start Kodi only for localhost command --- kodi.controller.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/kodi.controller.sh b/kodi.controller.sh index 757e8b0..3c7957a 100755 --- a/kodi.controller.sh +++ b/kodi.controller.sh @@ -251,14 +251,17 @@ main() { # {{{ ## Define all vars define_vars - ## If kodi is not running {{{ - ### AND Start it - ### AND exit 0 - is_proc_absent "${KODI_PROC_REGEXP}" \ - && debug_message "Start a new Kodi instance." \ - && kodi \ - && exit 0 - ## }}} + ## For localhost + if [ "${KODI_HOST}" = "${KODI_HOST_DEFAULT}" ]; then + ## If kodi is not running {{{ + ### AND Start it + ### AND exit 0 + is_proc_absent "${KODI_PROC_REGEXP}" \ + && debug_message "Start a new Kodi instance." \ + && kodi \ + && exit 0 + ## }}} + fi ## If the media should be paused {{{ if [ "${USER_MULTIMEDIA_COMMAND}" = "pause" ]; then