diff options
author | Lukas Rusak <lorusak@gmail.com> | 2023-04-17 13:26:26 -0700 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2023-04-20 08:43:35 -0700 |
commit | 3fb93608deea1dd5b87e0ae9e1d121f951d896e7 (patch) | |
tree | eaf3fbc74bbd75953ce319519844c6c83579614d /tools/Linux | |
parent | 4f46f1daa449da83765f6b3b324650e69bc65919 (diff) |
kodi.sh.in: add wrapper for deprecated KODI_AE_SINK env variable
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Diffstat (limited to 'tools/Linux')
-rw-r--r-- | tools/Linux/kodi.sh.in | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in index 11cace29a5..5dc1dd5260 100644 --- a/tools/Linux/kodi.sh.in +++ b/tools/Linux/kodi.sh.in @@ -171,12 +171,30 @@ if command_exists gdb; then fi fi +if [ -n "${KODI_AE_SINK}" ]; then + + echo "KODI_AE_SINK env variable is deprecated and will be removed in the future." + echo "Use the --audio-backend command line switch instead." + + if [ "${KODI_AE_SINK}" = "PIPEWIRE" ]; then + ENV_ARGS="--audio-backend=pipewire" + elif [ "${KODI_AE_SINK}" = "PULSE" ]; then + ENV_ARGS="--audio-backend=pulseaudio" + elif [ "${KODI_AE_SINK}" = "ALSA" ]; then + ENV_ARGS="--audio-backend=alsa" + elif [ "${KODI_AE_SINK}" = "SNDIO" ]; then + ENV_ARGS="--audio-backend=sndio" + elif [ "${KODI_AE_SINK}" = "ALSA+PULSE" ]; then + ENV_ARGS="--audio-backend=alsa+pulseaudio" + fi +fi + LOOP=1 while [ $(( $LOOP )) = "1" ] do [ -f "${APPORT_CORE}" ] && rm -f "${APPORT_CORE}" LOOP=0 - ${KODI_BINARY} $SAVED_ARGS & + ${KODI_BINARY} ${ENV_ARGS} $SAVED_ARGS & CHILD=$! wait "${CHILD}" RET=$? |