tvheadend: add ability to browse for file with xmltv epg format

This commit is contained in:
Gregor Fuis 2012-02-22 20:29:09 +01:00
parent b45628754b
commit 5aa0f6561a
4 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,5 @@
<settings>
<setting id="XMLTV_LOCATION" value="" />
<setting id="XMLTV_LOCATION_FILE" value="" />
<setting id="XMLTV_LOCATION_WEB" value="http://" />
<setting id="XMLTV_TYPE" value="NONE" />
</settings>

View File

@ -25,7 +25,8 @@
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.multimedia.hts-tvheadend"
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=`grep XMLTV_LOCATION $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"`
dflag=
vflag=
@ -33,10 +34,10 @@ cflag=
if [[ $# -lt 1 ]]; then
if [ "$XMLTV_TYPE" = "FILE" ]; then
cat "$XMLTV_LOCATION"
cat "$XMLTV_LOCATION_FILE"
exit 0
elif [ "$XMLTV_TYPE" = "WEB" ]; then
wget -qO - "$XMLTV_LOCATION"
wget -qO - "$XMLTV_LOCATION_WEB"
exit 0
fi
fi

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<!-- SABnzbd-Suite -->
<!-- HTS TVHEADEND -->
<string id="1000">XMLTV</string>
<string id="1011">XMLTV configuration</string>
<string id="1011">XMLTV source type</string>
<string id="1012">XMLTV location</string>
<string id="1012">XMLTV File location</string>
<string id="1013">XMLTV Web location</string>
</strings>

View File

@ -6,6 +6,7 @@
<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_LOCATION" type="text" label="1012" default="" enable="!eq(-1,1)"/>
<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)"/>
</category>
</settings>