tvheadend: Added changes to use a scripts stdout as the XMLTV input for the tvheadend grabber

This commit is contained in:
Diego Rivera 2013-04-29 22:57:16 -06:00 committed by Stefan Saraev
parent 7c5aa7243f
commit 5358014cb9
4 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,6 @@
3.0.10 (in progress)
- added the ability to use a script's stdout as the xmltv source instead of a fixed file or URL
3.0.9
- update to TVHeadend 3.4

View File

@ -27,6 +27,7 @@ ADDON_SETTINGS="$ADDON_HOME/settings.xml"
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_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"`
dflag=
vflag=
@ -36,6 +37,10 @@ if [[ $# -lt 1 ]]; then
if [ "$XMLTV_TYPE" = "FILE" ]; then
cat "$XMLTV_LOCATION_FILE"
exit 0
elif [ "$XMLTV_TYPE" = "SCRIPT" ]; then
if [ -e "$XMLTV_LOCATION_SCRIPT" ] ; then
exec "$XMLTV_LOCATION_SCRIPT"
fi
elif [ "$XMLTV_TYPE" = "WEB" ]; then
wget -qO - "$XMLTV_LOCATION_WEB"
exit 0

View File

@ -8,6 +8,7 @@
<string id="1011">XMLTV source type</string>
<string id="1012">XMLTV File location</string>
<string id="1013">XMLTV Web location</string>
<string id="1014">XMLTV Script location</string>
<string id="1020">DVB Configuration</string>
<string id="1021">Unload DVB mudules before suspend</string>
<string id="1022">Wait for frontend initialization</string>

View File

@ -5,9 +5,10 @@
<category label="1000">
<setting label="1010" type="lsep"/>
<setting type="sep" />
<setting id="XMLTV_TYPE" type="labelenum" label="1011" values="NONE|FILE|WEB" sort="yes" default="NONE"/>
<setting id="XMLTV_TYPE" type="labelenum" label="1011" values="NONE|FILE|SCRIPT|WEB" sort="yes" default="NONE"/>
<setting id="XMLTV_LOCATION_FILE" type="file" label="1012" default="" enable="eq(-1,0)"/>
<setting id="XMLTV_LOCATION_WEB" type="text" label="1013" default="http://" enable="eq(-2,2)"/>
<setting id="XMLTV_LOCATION_WEB" type="text" label="1013" default="http://" enable="eq(-2,3)"/>
<setting id="XMLTV_LOCATION_SCRIPT" type="file" label="1014" default="" enable="eq(-3,2)"/>
</category>
<category label="1001">
<setting label="1020" type="lsep"/>