mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
xbmc-pvr:
- adding caching to xbmc-pvr
This commit is contained in:
parent
d4bfd41acb
commit
ffc6225b2d
29
packages/mediacenter/xbmc-pvr/conf.d/xbmc
Normal file
29
packages/mediacenter/xbmc-pvr/conf.d/xbmc
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
################################################################################
|
||||||
|
# Mediacenter environment variables.
|
||||||
|
#
|
||||||
|
# This file contains non-OpenELEC evironment variables as well as OpenELEC
|
||||||
|
# evironment variables that are not user defined.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
XBMC_CACHING="yes"
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# do not change anything below
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
XBMC_HOME="/usr/share/xbmc"
|
||||||
|
|
||||||
|
export XBMC_HOME
|
||||||
|
|
||||||
|
cache_xbmc () {
|
||||||
|
progress "caching XBMC"
|
||||||
|
mkdir -p /var/cache/bin
|
||||||
|
cp -PR /usr/share/xbmc/xbmc.bin /var/cache/bin
|
||||||
|
touch /var/cache/xbmc.cache
|
||||||
|
}
|
||||||
|
|
||||||
|
wait_for_xbmc_cache () {
|
||||||
|
while [ ! -f /var/cache/xbmc.cache ]; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
@ -2,16 +2,20 @@
|
|||||||
#
|
#
|
||||||
# runlevels: openelec
|
# runlevels: openelec
|
||||||
|
|
||||||
wait_for_xorg
|
|
||||||
|
|
||||||
# export XBMC_HOME="/usr/share/xbmc"
|
|
||||||
args="--standalone -fs --lircdev $LIRC_OUTPUT"
|
args="--standalone -fs --lircdev $LIRC_OUTPUT"
|
||||||
|
|
||||||
|
if test "$XBMC_CACHING" = "yes" ; then
|
||||||
|
wait_for_xbmc_cache
|
||||||
|
XBMC_BIN="/var/cache/bin/xbmc.bin"
|
||||||
|
else
|
||||||
|
XBMC_BIN="/usr/share/xbmc/xbmc.bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
progress "starting Mediacenter"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
progress "starting Mediacenter"
|
DISPLAY=:0.0 $XBMC_BIN ${args} > /dev/null 2>&1
|
||||||
|
|
||||||
DISPLAY=:0.0 /usr/bin/xbmc ${args} > /dev/null 2>&1
|
|
||||||
RET=$?
|
RET=$?
|
||||||
echo "Exited with code $RET"
|
echo "Exited with code $RET"
|
||||||
|
|
||||||
@ -19,4 +23,5 @@ while true; do
|
|||||||
[ "$RET" == 64 ] && sync && poweroff
|
[ "$RET" == 64 ] && sync && poweroff
|
||||||
[ "$RET" == 66 ] && sync && reboot
|
[ "$RET" == 66 ] && sync && reboot
|
||||||
|
|
||||||
|
sleep 1
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user