mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-07 01:47:50 +00:00
vdr-addon: moved REMOVE_MODULES to addon config
This commit is contained in:
parent
1fdfab121e
commit
77cfb80df8
@ -33,7 +33,6 @@ mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||
cp $BUILD/vdr-[0-9]*/sources.conf $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||
cp $BUILD/vdr-[0-9]*/svdrphosts.conf $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||
echo '0.0.0.0/0' >> $ADDON_BUILD/$PKG_ADDON_ID/config/svdrphosts.conf
|
||||
cp -PR $PKG_DIR/config/vdr-sleep.conf $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/plugin
|
||||
cp -PR $BUILD/vdr-plugin-xvdr-*/libvdr*.so.* $ADDON_BUILD/$PKG_ADDON_ID/plugin
|
||||
|
@ -1,6 +0,0 @@
|
||||
# space-separated list of modules to remove on suspend
|
||||
# and load on resume
|
||||
# example:
|
||||
# REMOVE_MODULES="cx23885 mantis"
|
||||
|
||||
REMOVE_MODULES=""
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
<string id="1000">DVB</string>
|
||||
<string id="1020">DVB Configuration</string>
|
||||
<string id="1021">Unload DVB mudules before suspend</string>
|
||||
</strings>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="1000">
|
||||
<setting label="1020" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="REMOVE_MODULES" type="text" label="1021" values="" default=""/>
|
||||
</category>
|
||||
</settings>
|
@ -24,26 +24,24 @@
|
||||
|
||||
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.multimedia.vdr-addon"
|
||||
ADDON_CONFIG_DIR="$ADDON_HOME/config"
|
||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||
REMOVE_MODULES=`grep REMOVE_MODULES $ADDON_SETTINGS | awk '{print $3}' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
|
||||
if [ -f "$ADDON_CONFIG_DIR/vdr-sleep.conf" ]; then
|
||||
. "$ADDON_CONFIG_DIR/vdr-sleep.conf"
|
||||
|
||||
if [ ! "$REMOVE_MODULES" == "" ] ; then
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
vdr.stop
|
||||
for module in $REMOVE_MODULES ; do
|
||||
rmmod -w $module
|
||||
done
|
||||
;;
|
||||
thaw|resume)
|
||||
for module in $REMOVE_MODULES ; do
|
||||
modprobe $module
|
||||
done
|
||||
xbmc-send --host=127.0.0.1 -a "XBMC.RunScript(service.multimedia.vdr-addon)" &
|
||||
;;
|
||||
*) exit $NA
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! "$REMOVE_MODULES" == "" ] ; then
|
||||
case "$1" in
|
||||
hibernate|suspend)
|
||||
vdr.stop
|
||||
for module in $REMOVE_MODULES ; do
|
||||
rmmod -w $module
|
||||
done
|
||||
;;
|
||||
thaw|resume)
|
||||
for module in $REMOVE_MODULES ; do
|
||||
modprobe $module
|
||||
done
|
||||
xbmc-send --host=127.0.0.1 -a "XBMC.RunScript(service.multimedia.vdr-addon)" &
|
||||
;;
|
||||
*) exit $NA
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user