mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
tvheadend: fix tv_grab_file
tvheadend calls `tv_grab_file --description` to get a description of the grabber. If the grabber doesn't return a string, tvheadend will not use the grabber.
This commit is contained in:
parent
29b2c1a359
commit
e39e633138
@ -18,23 +18,52 @@
|
|||||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
. /etc/profile
|
if [ $# -lt 1 ]
|
||||||
|
then
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
ADDON_HOME="$HOME/.kodi/userdata/addon_data/service.multimedia.tvheadend"
|
ADDON_HOME="$HOME/.kodi/userdata/addon_data/service.multimedia.tvheadend"
|
||||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||||
XMLTV_TYPE=`grep XMLTV_TYPE $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
XMLTV_TYPE=`grep XMLTV_TYPE $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||||
XMLTV_LOCATION_FILE=`grep XMLTV_LOCATION_FILE $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
XMLTV_LOCATION_FILE=`grep XMLTV_LOCATION_FILE $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||||
XMLTV_LOCATION_WEB=`grep XMLTV_LOCATION_WEB $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
XMLTV_LOCATION_WEB=`grep XMLTV_LOCATION_WEB $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||||
XMLTV_LOCATION_SCRIPT=`grep XMLTV_LOCATION_SCRIPT $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
XMLTV_LOCATION_SCRIPT=`grep XMLTV_LOCATION_SCRIPT $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||||
|
|
||||||
if [ "$XMLTV_TYPE" = "FILE" ]; then
|
if [ "$XMLTV_TYPE" = "FILE" ]; then
|
||||||
cat "$XMLTV_LOCATION_FILE"
|
cat "$XMLTV_LOCATION_FILE"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$XMLTV_TYPE" = "SCRIPT" ]; then
|
elif [ "$XMLTV_TYPE" = "SCRIPT" ]; then
|
||||||
if [ -e "$XMLTV_LOCATION_SCRIPT" ] ; then
|
if [ -e "$XMLTV_LOCATION_SCRIPT" ] ; then
|
||||||
exec "$XMLTV_LOCATION_SCRIPT"
|
exec "$XMLTV_LOCATION_SCRIPT"
|
||||||
|
fi
|
||||||
|
elif [ "$XMLTV_TYPE" = "WEB" ]; then
|
||||||
|
wget -qO - "$XMLTV_LOCATION_WEB"
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
elif [ "$XMLTV_TYPE" = "WEB" ]; then
|
fi
|
||||||
wget -qO - "$XMLTV_LOCATION_WEB"
|
|
||||||
exit 0
|
dflag=
|
||||||
|
vflag=
|
||||||
|
cflag=
|
||||||
|
|
||||||
|
for a in "$@"
|
||||||
|
do
|
||||||
|
[ "$a" = "-d" -o "$a" = "--description" ] && dflag=1
|
||||||
|
[ "$a" = "-v" -o "$a" = "--version" ] && vflag=1
|
||||||
|
[ "$a" = "-c" -o "$a" = "--capabilities" ] && cflag=1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$dflag" ]
|
||||||
|
then
|
||||||
|
echo "tv_grab_file is a simple grabber that can be configured through the addon settings from Kodi"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$vflag" ]
|
||||||
|
then
|
||||||
|
echo "1.0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$cflag" ]
|
||||||
|
then
|
||||||
|
echo "baseline"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user