Project

General

Profile

No EPG using zap2xml

Added by Tom Johnson over 8 years ago

I have tried every tutorial I can find and cannot seem to get this fixed. No matter what I do, the config page for the EPG will not show the xml file that I created using tv-grab-file. It runs, creates the xml file per the changed cat /home/zap2xml etc in the file. Why will tvheadend not see this new file? How in the heck do I tell tvheadend NOT to use ~./xmltv/tvgrabfile.xmltv and use my file /home/hts/zap2xml/xmltv.xml instead? I have never seen anything in any how to or forum that tells you how to change this.

Anyone???


Replies (13)

RE: No EPG using zap2xml - Added by Mark Clarkstone over 8 years ago

You need to fake the find grabbers output, see: https://gist.github.com/dreamcat4/257945c494f5a078e3f4

just create a small script that returns the output of your xml, add the script as a "grabber" to find_grabbers :)

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

No dice. When I restart it I get this as the output:

2016-08-19 06:42:33.354 spawn: Executing "/usr/bin/tv_grab_file"

2016-08-19 06:42:38.630 /usr/bin/tv_grab_file: grab took 5 seconds

2016-08-19 06:42:39.357 /usr/bin/tv_grab_file: parse took 0 seconds

2016-08-19 06:42:39.357 /usr/bin/tv_grab_file: channels tot= 508 new= 0 mod= 0

2016-08-19 06:42:39.357 /usr/bin/tv_grab_file: brands tot= 0 new= 0 mod= 0

2016-08-19 06:42:39.357 /usr/bin/tv_grab_file: seasons tot= 0 new= 0 mod= 0

2016-08-19 06:42:39.357 /usr/bin/tv_grab_file: episodes tot= 0 new= 0 mod= 0

2016-08-19 06:42:39.357 /usr/bin/tv_grab_file: broadcasts tot= 0 new= 0 mod= 0

Unless I didn't understand the post, which is possible. But this is what I was getting before.

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

One other thing I have noticed, when I go to assign EPG source, the only option there is microsoft.com. How do I get it to see zap2it?

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

Ok, so now I have my /usr/bin/tv_grab_file set liek this:

#!/bin/bash
dflag=
vflag=
cflag=
if (( $# < 1 ))
then
cat /home/hts/zap2xml/xmltv.xml
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_grab_file is a simple grabber that just read the /home/hts/zap2xml/xmltv.xml file\n"
fi
if [ "$vflag" ]
then
printf "0.1\n"
fi

Permissions on the xmltv.xml file: rw-r--r- 1 hts video 2155108 Aug 19 08:46 /home/hts/zap2xml/xmltv.xml

Now when I go to the system log, it oputputs:

2016-08-19 09:22:21.652 /home/hts/zap2xml/xmltv.xml: grab /home/hts/zap2xml/xmltv.xml
2016-08-19 09:22:21.653 spawn: Executing "/home/hts/zap2xml/xmltv.xml"
2016-08-19 09:22:21.655 /home/hts/zap2xml/xmltv.xml: no output detected
2016-08-19 09:22:21.655 /home/hts/zap2xml/xmltv.xml: grab returned no data

So wtf is the deal???

RE: No EPG using zap2xml - Added by Robert Cameron over 8 years ago

Does your XMLTV file already exist when the grabber runs? From the error, it looks like the problem is that there is no data in the xmltv.xml file to output.

Another thing to consider: what are the permissions on ~hts/zap2xml/xmltv.xml? Does the user that runs Tvheadend have read permissions for both xmltv.xml and the directories that contain it?

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

Yes the file has data:

hts@media:~/zap2xml$ tail xmltv.xml
<episode-num system="dd_progid">SH00000001.0000</episode-num>
<previously-shown />
</programme>
<programme start="20160826050000 -0400" stop="20160826053000 -0400" channel="I63986.labs.zap2it.com">
<title lang="en">Paid Programming</title>
<desc lang="en">Paid programming.</desc>
<episode-num system="dd_progid">SH00000001.0000</episode-num>
<previously-shown />
</programme>
</tv>

File permissions:

hts@media:~/zap2xml$ ls al xmltv.xml
-rw-r--r-
1 hts video 2258294 Aug 19 10:15 xmltv.xml

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

Seriously??? Does no one know who to properly configure this damned thing?!?! Why is there no documentation that outlines the flow? What file does tvheadend look at for the epg?? What file does it look at for the channels?? As far as I can tell, it looks at /usr/bin/tv_grab_file which points it to /home/hts/zap2xml/xmltv.xml. However, even though that file is populated, this damned program will NOT read it!!

Bueller? Bueller? Bueller?

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

Ok, finally got it working...I think. Expect in Plex I do not see the guide. Is there some other plugin I need in order to see the guide?

RE: No EPG using zap2xml - Added by K Shea over 8 years ago

Tom Johnson wrote:

I have tried every tutorial I can find and cannot seem to get this fixed. No matter what I do, the config page for the EPG will not show the xml file that I created using tv-grab-file. It runs, creates the xml file per the changed cat /home/zap2xml etc in the file. Why will tvheadend not see this new file? How in the heck do I tell tvheadend NOT to use ~./xmltv/tvgrabfile.xmltv and use my file /home/hts/zap2xml/xmltv.xml instead? I have never seen anything in any how to or forum that tells you how to change this.

Anyone???

Okay, first of all, was one of the tutorials you read this one? https://freetoairamerica.wordpress.com/2014/12/03/some-hints-for-getting-free-to-air-satellite-channels-into-the-electronic-program-guide-in-kodi-or-xbmc-or-another-frontend/

That one may not be laid out the best but I think it would answer many of your questions.

You should NOT need to modify the tv-grab-file script UNLESS you want to change the location where the file is saved. The script is at /usr/bin/tv_grab_file (assuming you installed it there, as instructed) and it should be owned by root and made world exedutable. The 7th line down in that script reads:

cat ~/.xmltv/tv_grab_file.xmltv

So, you could change that to

cat /home/hts/zap2xml/xmltv.xml

Or, you could symlink /home/hts/zap2xml/xmltv.xml to ~/.xmltv/tv_grab_file.xmltv - either one would work. Make sure you set that XML file to be world readable, otherwise TVHeadEnd might not be able to import it.

I think that article should answer most of your other questions. I know that setting it up the first time isn't the easiest thing to do, but it's like many other things, once you have it working it will seem obvious to you.

If you have any other questions (except about Plex; I don't use that - I use TVHeadEnd as my backend and Kodi for my frontends), feel free to ask and I'll try to answer, but I only check this forum now and then so it won't be an instantaneous response. (Obviously you can still ask about Plex, I'm just saying I can't help you with that, but maybe someone else can.)

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

It's working, I guess. But no channel icons, and the guide is not what I expected. See attached image. My picons path is set like this under general. file:///home/hts/zap2xml/picons/%C.png

epg.png (52.5 KB) epg.png

RE: No EPG using zap2xml - Added by Tom Johnson over 8 years ago

Hello? Anyone?

RE: No EPG using zap2xml - Added by cilin dro about 8 years ago

dude i use zap2it but zap2xml dont give you any channel icon just tvguide. Try downloading the channel icon then resize i dont remember the size, upload to dropbox or any cloud and take donload link and put in channel tab in tvh.

RE: No EPG using zap2xml - Added by edit4ever ! about 8 years ago

Tom Johnson wrote:

It's working, I guess. But no channel icons, and the guide is not what I expected. See attached image. My picons path is set like this under general. file:///home/hts/zap2xml/picons/%C.png

I had to change the Channel icon name scheme to "No scheme" under tvh general settings.

Also - the name of the channel used by zap2it has to match the name of the icon file...so make sure that "update channel name" is set on the epg grabber settings.

If you're using kodi - my addon may be a lot easier to configure: [[https://github.com/edit4ever/script.module.zap2xml/releases/download/v0.4.6/script.module.zap2xml-0.4.6.zip]]

    (1-13/13)