Kodi Community Forum
tv_grab_file??? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: tv_grab_file??? (/showthread.php?tid=101779)



tv_grab_file??? - illiac4 - 2011-05-18

Hi! This is the code that should work with TVHeadend and parse the file from net.
The TVHeadend seas it but it reports:
Quote:May 18 17:52:13 xmltv: Grabbing "tv_grag_sl Grab TV listings for SiOL TV channels" using command "/usr/bin/tv_grab_sl"

May 18 17:52:15 xmltv: No output from "/usr/bin/tv_grab_sl"

Any clue?= I have read somevhere that should be run as HTS user, but how can this be done?

Code:
#!/bin/bash
dflag=
vflag=
cflag=
if (( $# < 1 ))
then
#  cat ~/.xmltv/tv_grab_file.xmltv
#  cat ~/.xmltv/*.xmltv
  wget [url]http://sloiptv.tano.si/epg/xmltv-sl.xml[/url]
  exit 0
fi

for arg
do
    delim=""
    case "$arg" in
    #translate --gnu-long-options to -g (short options)
       --description) args="${args}-d ";;
       --version) args="${args}-v ";;
       --capabilities) args="${args}-c ";;
       #pass through anything else
       *) [[ "${arg:0:1}" == "-" ]] || delim="\""
           args="${args}${delim}${arg}${delim} ";;
    esac
done

#Reset the positional parameters to the short options
eval set -- $args

while getopts "dvc" option
do
    case $option in
        d)  dflag=1;;
        v)  vflag=1;;
        c)  cflag=1;;
        \?) printf "unknown option: -%s\n" $OPTARG
            printf "Usage: %s: [--description] [--version] [--capabilities] \n" $(basename $0)
            exit 2
            ;;
    esac >&2
done

if [ "$dflag" ]
then
   printf "tv_grag_sl Grab TV listings for SiOL TV channels\n"
fi
if [ "$vflag" ]
then
   printf "0.1\n"
fi
if [ "$cflag" ]
then
   printf "baseline\n"
fi

exit 0



- opdenkamp - 2011-05-18

that's something for the tvheadend forum or irc channel.


- xxxnelly - 2011-05-19

sudo su hts
/usr/bin/tv_grab_sl --configure

then that config will be able to be used by tvheadend.

Thanks
Neil