xbmc-pvr:

- adding caching to xbmc-pvr
This commit is contained in:
Stephan Raue 2010-02-11 21:30:46 +01:00
parent d4bfd41acb
commit ffc6225b2d
2 changed files with 40 additions and 6 deletions

View 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
}

View File

@ -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