Feature #317
XMLTV grabber works but 0 events gets injected into epg database
0%
Description
I am using TVheadend 2.11 on a Ubuntu 10.04 Server 64 bit and a PVR-350 as Analog Video Input.
XMLTV is configured fine, and produces a file like expected with "tv_grab_ch_search --output FILE"
In the Web-surface some Channels (i do not have a XMLTV source for all Channels) also have a mapped XMLTV Channel.
But it do not Display any EPG Data in The Homescreen:
Aug 18 15:09:59 xmltv: Grabbing "Switzerland (tv.search.ch)" using command "/usr/bin/tv_grab_ch_search" Aug 18 15:27:38 xmltv: /usr/bin/tv_grab_ch_search: Parsing completed. XML contained 28 channels, 15896 events, 0 new events injected in EPG
Any Ideas? What info can i provide?
Cheers,
stif
PS: Everything but the EPG is functioning impressively well. Thanks for the great work!
PPS: I posted this already under [http://trac.lonelycoder.com/hts/ticket/210] but i did not find a way to "reopen" the issue.
UPDATE:
In the Meantime the grabber source "tv.search.ch" has changed its layout, so i had to install the new CVS-version of xmltv, which is able to deal with it.
But unfortunately it still does not inject the events in EPG:
Oct 28 00:39:59 xmltv: Grabbing "Switzerland (tv.search.ch)" using command "/usr/local/bin/tv_grab_ch_search" Oct 28 00:46:34 xmltv: Channel "gotv" automapped to xmltv-channel "gotv" (name matches) Oct 28 00:46:34 xmltv: Channel "QVC" automapped to xmltv-channel "QVC" (name matches) Oct 28 00:46:34 xmltv: /usr/local/bin/tv_grab_ch_search: Parsing completed. XML contained 37 channels, 6539 events, 0 new events injected in EPG
Files
History
Updated by sbi - about 14 years ago
I have had a similar problem once with xmltv files where the stop time attribute was missing. Can you post your xmltv output?
Updated by stif - about 14 years ago
Replying to [comment:1 sbi]:
I have had a similar problem once with xmltv files where the stop time attribute was missing. Can you post your xmltv output?
you are right, i have added a (shortend) xmltv-output, and indeed it is missing the stop time attribute.
<programme start="20101027000000 +0100" channel="gotv.search.ch"> <title lang="de">Clubnight</title> <desc lang="de">Du willst mal nicht ausgehen? Dann lass doch den Club zu dir kommen. gotv präsentiert dir die besten Songs und Geheimtipp-Videos. Zum Feiern, Partymachen oder Chillen - und das jeden Tag die ganze Nacht!</desc> <category lang="de">Musik</category> <category lang="de">magazin. Unterhaltung</category> </programme>
is there a way to get it running without the stop time attribute?
cheers
Updated by Andreas Smas about 14 years ago
Not as the code is now. But I guess it could be improved
Updated by stif - about 14 years ago
I did some research on this topic and i came across the xmltv filter "tv_sort":
# tv_sort --help /usr/local/bin/tv_sort: sort listings by time, sanity-check and add stop time to programmes
i tried it and it really adds the stop time attribute to the xmltv-file.
So it would be nice to filter the tv_grab_* output with tv_sort before injecting the data in TVheadend EPG
Can anyone tell me how to do that?
Updated by stif - about 14 years ago
i have found a dirty workaround:
in the console i renamed the script and created a new one with the "old" name:
cd /usr/local/bin sudo mv tv_grab_ch_search tv_grab_ch sudo nano tv_grab_ch_search
The new "tv_grab_ch_search" has the following lines:
#! /bin/sh tv_grab_ch --output ~/.epgdata.xml tv_sort ~/.epgdata.xml
So finally i have my EPG working!
There is just one small issue: after update to the CVS-Version of xmltv i cannot change the "XML-TV Source" in the web-gui of tvheadend any more. But i don't really care about that.
Suggestion:
Maybe you can make this default (tv_grab_* -> tv_sort -> Tvheadend EPG) since the tv_sort script comes with xmltv.
The only downside is a little extra time, but on the other hand xmltv EPG will work with more scripts and will be less error prone.
Updated by stif - about 14 years ago
- Found in version set to worksforme
Well, the solution above did only function for a short time. the script did not respond correctly to commands like --version ...
I wrote and attached a small perl script which announces itself correctly, but unfortunately the output of the xmltv data is too slow and tvheadend gives a timeout..
So there are things like http://code.google.com/p/tv-grab-file/ to import a (sorted) xmltv file that have been created before, for example through a cron-job.
I did not like this Solution, and in the end i wrote a xmltv-grabber from the scratch, which i will post shortly to the xmltv-crew.
So finally the xmltv thing is working for me.
Updated by virtual dj over 8 years ago
stif -¶
I know this post is very old, but I hope you'll still receive the emails.
Do you think you can update your tv_grab_script file and post it maybe to GitHub?
I think XMLTV has changed something in their configuration because you cannot configure tv_grab_script anymore without errors; in fact, it gives:
Unknown stage end at /xmltv/bin/tv_grab_script line 63.
That's because of:
sub config_stage { ... cut ... $writer->end( 'end' ); #$writer->end(); #why not?? return $result; }According to the XMLTV wiki (http://wiki.xmltv.org/index.php/HowtoWriteAGrabber#Writing_a_stage_sub), the final stage should always be select-channels and not end. But changing the line to:
$writer->end( 'select-channels' );doesn't solve, even though the main grabber is correctly configured.
Trying to run tv_grab_script --configure
with that modification gives:
... cut ... </channel> </tv> :1: parser error : Start tag expected, '<' not found 0But that's due to the script (and prevents the configuration to be stored correctly as the exit code is not "0"). Feeding the main grabber output to tv_sort doesn't give any error.
Then, after renaming the partial configuration:
mv ~/.xmltv/tv_grab_script.conf.TMP ~/.xmltv/tv_grab_script.confthe tv_grab_script works correctly.
It would be great if you can publish a patch of your script, which is very useful when the broadcasters don't publish an "end program" time. Apparently TVHeadend still has problems to ingest programs without the "end" attribute.
Updated by virtual dj almost 7 years ago
- File tv_grab_script tv_grab_script added
For those who still may be interested, I finally was able to fix the configuration error on stif's tv_grab_script file and I've attached it.