2018-09-23, 17:49
I am a bit confused from what I have looked at online as to how I can upload my own custom .xml EPG file into TVHeadEnd on Linux. Can anyone asssit?
#!/bin/bash
xmltv_file_location=/home/xbmc/.wg++/guide.xml
dflag=
vflag=
cflag=
if (( $# < 1 ))
then
cat "$xmltv_file_location"
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 "$0 is a wrapper grabber around WebGrab+Plus\n"
fi
if [ "$vflag" ]
then
printf "0.1\n"
fi
if [ "$cflag" ]
then
printf "baseline\n"
fi
exit 0
(2018-09-24, 13:04)xbmclinuxuser Wrote: [ -> ]Another option is to use tv-grab-file from https://github.com/Rigolo/tv-grab-fileapologies for the slow reply, i am away with work. with regards to your wordpress link, in this bit:
There's an article at https://freetoairamerica.wordpress.com/2...-frontend/ that may be helpful even though it's for a slightly different purpose. Really you need to make sure your .xml file is in the correct format, then it should be relatively easy to get Tvheadend to read it in using one of the external grabbers mentioned in this thread. If it doesn't work check that your grabber is executable and that it can be run by the hts (Tvheadend) user, in other words if it's owned by root make sure it can be executed by any user. Also make sure your xml file can be read by the hts user. Linux permissions will get you every time!
(2018-09-27, 00:17)gdogg371 Wrote: [ -> ](2018-09-24, 13:04)xbmclinuxuser Wrote: [ -> ]Another option is to use tv-grab-file from https://github.com/Rigolo/tv-grab-fileapologies for the slow reply, i am away with work. with regards to your wordpress link, in this bit:
There's an article at https://freetoairamerica.wordpress.com/2...-frontend/ that may be helpful even though it's for a slightly different purpose. Really you need to make sure your .xml file is in the correct format, then it should be relatively easy to get Tvheadend to read it in using one of the external grabbers mentioned in this thread. If it doesn't work check that your grabber is executable and that it can be run by the hts (Tvheadend) user, in other words if it's owned by root make sure it can be executed by any user. Also make sure your xml file can be read by the hts user. Linux permissions will get you every time!
"If typing “which nc” returned a path, then you can use this to import your guide data into Tvheadend using the socket method, replacing the paths and filenames as needed:
cat /home/hts/.xmltv/tv_grab_file.xmltv | nc -w 5 -U /home/hts/.hts/tvheadend/epggrab/xmltv.sock"
...I am a bit confused as to how this relates to importing my custom .xml file. which bit of the command is the source and which is the target?
cat /home/hts/.xmltv/tv_grab_file.xmltv
is the source path, /home/hts/.hts/tvheadend/epggrab/xmltv.sock
is the target.cat
is a command that takes a filename and writes the content to somewhere, or stdin if you don't tell it where to write (so it writes it into the terminal you type the command in). nc
does a similar thing but reads and writes across network connections. |
(pipe) sends the output of one command to the input of the next.cat /path/to/custom/xmltv.filename | nc -w 5 -U /home/hts/.hts/tvheadend/epggrab/xmltv.sock
. If you want to know, -w 5 means wait 5 seconds before timing out (if TVH doesn't respond) and -U means UNIX-Domain sockets.2018-09-28 07:52:18.309 xmltv: /usr/bin/tv_grab_wg++: grab /usr/bin/tv_grab_wg++
2018-09-28 07:52:18.323 spawn: Executing "/usr/bin/tv_grab_wg++"
2018-09-28 07:52:18.916 xmltv: /usr/bin/tv_grab_wg++: grab took 1 seconds
2018-09-28 07:52:20.461 xmltv: /usr/bin/tv_grab_wg++: parse took 1 seconds
2018-09-28 07:52:20.461 xmltv: /usr/bin/tv_grab_wg++: channels tot= 124 new= 0 mod= 0
2018-09-28 07:52:20.461 xmltv: /usr/bin/tv_grab_wg++: brands tot= 0 new= 0 mod= 0
2018-09-28 07:52:20.461 xmltv: /usr/bin/tv_grab_wg++: seasons tot= 0 new= 0 mod= 0
2018-09-28 07:52:20.461 xmltv: /usr/bin/tv_grab_wg++: episodes tot= 0 new= 0 mod= 0
2018-09-28 07:52:20.461 xmltv: /usr/bin/tv_grab_wg++: broadcasts tot=28392 new= 1493 mod= 2917
(2018-09-29, 16:38)gdogg371 Wrote: [ -> ]I haven’t done that bit yet, but will do thanks. I need to add write a python script to download it from the provider each day and unpack it for the cron to pick up as well.
(2019-08-27, 17:10)acegolfer Wrote: [ -> ](2018-09-29, 16:38)gdogg371 Wrote: [ -> ]I haven’t done that bit yet, but will do thanks. I need to add write a python script to download it from the provider each day and unpack it for the cron to pick up as well.
another NextPVR user using zap2xml to pull EPG from zap2it. It updates every day and pull 14 day EPG.
Can I use the same XML file for TVH (which is running in Windows Subsystem Linux)? How?