My software

February 18 2009

TV Movie programme for XMLTV

Filed under: tvmovieThiton at 14:31

Recently, the TV Movie paper has changed its publication format for electronic programme data to match its new ClickFinder software. Unfortunately, a Linux version of this software is still missing; to remedy this, I have written a converter for these data to XMLTV and a script automating the EPG data acquisition.

I donate this script to the public. However, since the TV Movie paper probably finances its Click-Finder program with advertisements[1], please make sure you visit their web page regularily or find some other while to make this service worth their while.

UPDATE: Version 1.2 of this script is available.

Flattr this

[1] An assumption I could not check due to an incompatibility with Wine

20 comments

  1. That Script seems to be amazing, but I have a questtion
    before i'm going to test it.
    
    what to fill in the channels-file?
    
    The Readme-File says: Edit the channels file to contain
    all channels to grab, with one
    XMLTV id per line.
    
    That means, something like this?
    
    urn:xmltv.info:de:ard 
    urn:xmltv.info:de:zdf
    ...
    
    But the channels-file is already filled with some other
    synthax, like:
    
    ard.de
    zdf.de
    ...
    
    So what is the right Synthax, to get this Script work?
      

    comment by Lorus — Mar 6 at 00:29

  2.  That Script seems to be amazing, but I have a questtion
     before i'm going to test it.
    
    what to fill in the channels-file?
    
    The Readme-File says: Edit the channels file to contain
    all channels to grab, with one
    XMLTV id per line.
    
    That means, something like this?
    
    urn:xmltv.info:de:ard 
    urn:xmltv.info:de:zdf
    ...
    
    But the channels-file is already filled with some other
    synthax, like:
    
    ard.de
    zdf.de
    ...
    
    So what is the right Synthax, to get this Script work?
      

    comment by Lorus — Mar 6 at 00:30

  3. Hi Lorus,
    
    this script uses the URLs, not the URNs.
    You can get a list of the available URLs
    together with the familiar plain-text callsigns
    by running decode --list-channels .
    
    You got the syntax just right. If the URLs don't
    suit you, you might consider changing the channelsList
    table in decoder.cpp .
    
    Hope that helps, Steve
      

    comment by Thiton — Mar 6 at 09:11

  4. Ok, I just changed the XMLTV ID's of my stations to the
    URL Synthax.
    
    Now it works like a charm :-)
    
    Wonderful work :-)
    
    2 little things:
    
    1) It don't gather information for nick
    2) What to do to add an additional station, i.e. dmax? I
    think it's part of the free section of tvmovie, but isn't
    listed in your script
      

    comment by Lorus — Mar 6 at 19:30

  5. Hi Lorus,
    
    thanks.
    For Nick, I have no idea why the grabber would break. I've
    just tried manually (downloading channel with number 190
    and decoding it), and
    it returned programme data for today.
    
    For missing channels, you'd need to scan the TV Movie site
    for the channel IDs. I've done this by
    a loop like "for chan in `seq 250`; do wget
    http://tvmovie/$i.cftv; done", with the exact URL to be
    found in the tvmovie.sh script. I've only scanned channels
    up to roughly 250; there might be more around. If you find
    more, add them
    to the channelList array in decode.cpp, and I'd be happy
    to integrate these into the upstream.
    
    Regards, Thiton
      

    comment by Thiton — Mar 8 at 23:32

  6. Great!
    Thank you very much for this new grabber after
    tv_grab_prisma doesn't work anymore...
    
    This one works so much better :-)
      

    comment by Horny — Apr 2 at 19:30

  7.  Thanks, great tool, one little problem - start times of
     all programs in the db are one hour too early. Guess it's
     a DST issue (I'm in CEST zone), I'm a bit confused about
     the "epoch" part of the source code, maybe somebody else
     knows how to fix this easily.
    Thanks!
      

    comment by Harald — Apr 11 at 23:42

  8. Hello Harald,
    
    thanks for the hint. Yes, this is actually a DST issue -
    TV Movie seems to give DST-adjusted times in their files. I
    have fixed that together with a few other issues in the
    1.1 release.
    Let me know if the issue persists.
    
    Best regards, Thiton
      

    comment by Thiton — Apr 14 at 00:34

  9. Hi Thiton,
    
    thanks for your update. Now the start/stop times are in
    GMT, thus 2h earlier than at my local timezone (CEST). Now
    that we got the GMT right, we just have to adjust the
    timezone, I guess...
    
    Best, Harald
      

    comment by Harald — Apr 26 at 11:49

  10. Hi Harald,
    
    as far as I interpret the results, the times are correct
    and given in GMT, which is in my humble opinion a good
    fail-safe default. Any program processing XMLTV data
    should be able to process these times and put them into
    local time zone.
    
    Do you have any application that can't? If so, you could
    try changing the time-printing code (Database.h, lines 130
    and 132) to use localtime() instead of gmtime() and then
    make sure the strftime() in line 132 prints the proper
    time zone with it. If this change is of wider interest,
    I'd be happy to integrate it into the upstream.
    
    Best Regards, Thiton
      

    comment by Thiton — Apr 26 at 13:00

  11. Hi Thiton,
    
    mythfilldatabase doesn't seem to interpret timezone "+0000"
    as GMT, so applying the changes you suggested to Database.h
    did the trick:
    
    130c130
    <             broken = gmtime(&unixTime);
    ---
    >             broken = localtime(&unixTime);
    132c132
    <             strftime(buffer, 30, "%Y%m%d%H%M%S +0000",
    broken);
    ---
    >             strftime(buffer, 30, "%Y%m%d%H%M%S %Z",
    broken);
    
    Thanks, Thiton, great script!
    
    Best, Harald
      

    comment by Harald — Apr 26 at 20:45

  12.  Hello,
    I just cant find out how to set the xmltv IDs
    I always get 
    Unknown xmltv channel identifier: 3.br-online.de - Skipping
    channel.
    for every single channel.
    
    What do I have to enter as ID in mythtv?
      

    comment by Opa[TROLL] — Apr 28 at 21:45

  13. Hello Opa,
    
    this is an error from mythfilldatabase, right? Probably,
    you need to either remove 3.br-online.de from the
    "channels" configuration file of the script or add it to
    mythtv. Additionally, did you check if the source ID in
    the tvmovie.sh script is correct?
    
    Regards, Thiton
      

    comment by Thiton — Apr 30 at 10:42

  14. Yes, it is an error from mythfilldatabase. The problem
    occurs, when the script tries to sort the programm
    information into the database. The problem is, that I
    don't know what xmltv-ids  I have to enter in mythtvs
    channel configuration. I think it is the same thing as
    above with the URL and URN thing. But I can't figure out,
    what I have to do.
    
    Regards, Opa[TROLL]
      

    comment by Opa[TROLL] — May 1 at 10:12

  15. Hello Opa,
    
    you can get a list of all used XMLTV ID's together
    with normal callsigns by running "decode
    --list-channels". Try to insert those into the mythtv
    database.
      

    comment by Thiton — May 3 at 15:40

  16. Hello again,
    I worked it out now :)
    the problem was, that my channels are on source 2 and not
    source 1.
    But in your mythfilldatabase line, you hardcoded the 1. You
    could maybe add a comment there
      

    comment by Opa[TROLL] — May 5 at 17:45

  17. Thank you very much for your help, but the problem was,
    that the source 1 is hardcoded in the mythfilldatabase
    line... but my source has the number 2....
    
    Regards, Opa[TROLL]
      

    comment by Opa[TROLL] — May 5 at 20:04

  18. I tried your script on my mythbuntu 9.10. The download of
    the files seems to work but I get the following error at
    the decoding:
    
    $ /usr/local/libexec/decode_tvmovie_clickfinder
    tvdaten-free-001.cftv
    
    terminate called after throwing an instance of
    'std::bad_alloc'
      what():  std::bad_alloc
    Aborted
    
    Can you help me?
      

    comment by Wolfgang — Nov 21 at 16:24

  19.  Thank you very much for the grabber, works
     perfectly for me. I wrote a tutorial concerning
     Mythtv and Aontv, which also covers the
     installation of this grabber: available here
     http://tutori.alitility.com/doku.php?id=ubuntu:aontv_mythtv
      

    comment by Stefan — Mar 14 at 22:01

  20. Hej there, 
    thank you for the script. Using Version 1.2 on ubuntu
    10.04 LTS and mythtv (MythTV Version   : 24158
    MythTV Branch    : branches/release-0-23-fixes) I am able
    to find programs using the search function. Sadly, when I
    open the EPG, I get a "NO DATA" entry next to the channel
    names. Do you have any idea what may be wrong?
    
    thank you, 
    sven
      

    comment by sven — Nov 13 at 23:39

Comment

TextMixedHTML

Valid XHTML Strict 1.0 Valid Atom Design by Northern Web Coders