tv_grab_sd_json added to the XMLTV project

Use this forum to discuss issues related to the SD-JSON service.

tv_grab_sd_json added to the XMLTV project

Postby rmeden » Wed May 18, 2016 7:27 am

A SD-JSON -> XMLTV grabber has been added to the XMLTV project.

If you're on Windows, the alpha EXE has been updated
  • download http://alpha-exe.xmltv.org and save somewhere (preferably a directory without spaces
  • xmltv.exe tv_grab_sd_json --configure # answer questions
  • xmltv.exe tv_grab_sd_json --days 1 --output tv.xml # will output 1 day of data to tv.xml

Other operating systems can download the source from sourceforge CVS ( http://sf.xmltv.org) or nightly snapshot (http://snapshot.xmltv.org )
rmeden
SD Board Member
 
Posts: 1484
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: tv_grab_sd_json added to the XMLTV project

Postby bonelifer » Wed May 18, 2016 1:06 pm

Oh, CVS, whilt thee not meet thy dire end? :(

Complains of a missing "LIBEAY32_.dll".
bonelifer
 
Posts: 24
Joined: Wed Sep 07, 2011 5:43 am

Re: tv_grab_sd_json added to the XMLTV project

Postby rmeden » Wed May 18, 2016 5:18 pm

What OS?

I manually added it to xmltv.exe.. download and try again as well.
rmeden
SD Board Member
 
Posts: 1484
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: tv_grab_sd_json added to the XMLTV project

Postby bonelifer » Wed May 18, 2016 8:16 pm

Windows 7 64bit. Still the same. Here's something from the cmd prompt. Happens right after entering password.

Code: Select all
Password:
** POST https://json.schedulesdirect.org/20141201/token ==> 501 Can't load 'C:\U
sers\william\AppData\Local\Temp\pdk-william-11332\/auto/Net/SSLeay/SSLeay' for m
odule Net::SSLeay: load_file:The specified module could not be found (LWP::Proto
col::https not installed) (5s)
LWP will support https URLs if the LWP::Protocol::https module
is installed.

Retry in 10 seconds...
** POST https://json.schedulesdirect.org/20141201/token ==> 500 Can't locate obj
ect method "new" via package "LWP::Protocol::https::Socket"
Can't locate object method "new" via package "LWP::Protocol::https::Socket" at /
<C:\xmltv\xmltv.exe>LWP/Protocol/http.pm line 29.

Retry in 10 seconds...
** POST https://json.schedulesdirect.org/20141201/token ==> 500 Can't locate obj
ect method "new" via package "LWP::Protocol::https::Socket"
Can't locate object method "new" via package "LWP::Protocol::https::Socket" at /
<C:\xmltv\xmltv.exe>LWP/Protocol/http.pm line 29.

Retry count exceeded. at /<C:\xmltv\xmltv.exe>grab/sd_json/tv_grab_sd_json line
185.
bonelifer
 
Posts: 24
Joined: Wed Sep 07, 2011 5:43 am

Re: tv_grab_sd_json added to the XMLTV project

Postby rmeden » Wed May 18, 2016 9:06 pm

I was able to replicate it... and after many attempts it tested clean. Alpha-exe updated.. please try again.
rmeden
SD Board Member
 
Posts: 1484
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: tv_grab_sd_json added to the XMLTV project

Postby bonelifer » Thu May 19, 2016 11:25 am

Worked. Quick question. How would a mythtv user setup this. Would it be the same as the old tv_grab_na_sd grabber or would we do we set it up like the other grabbers.

ie
https://www.mythtv.org/wiki/Mythfilldatabase#External_XMLTV wrote:Note that Schedules Direct members should not use the --file argument with mythfilldatabase. They should instead use --dd-file with data obtained by running tv_grab_na_dd using the --dd-data argument.
bonelifer
 
Posts: 24
Joined: Wed Sep 07, 2011 5:43 am

Re: tv_grab_sd_json added to the XMLTV project

Postby rmeden » Thu May 19, 2016 1:58 pm

bonelifer wrote:Worked. Quick question. How would a mythtv user setup this. Would it be the same as the old tv_grab_na_sd grabber or would we do we set it up like the other grabbers.

ie
https://www.mythtv.org/wiki/Mythfilldatabase#External_XMLTV wrote:Note that Schedules Direct members should not use the --file argument with mythfilldatabase. They should instead use --dd-file with data obtained by running tv_grab_na_dd using the --dd-data argument.


That MythTV statement should be updated to say ""Schedules Direct members using the North American SD-DD service should not use the --file argument".

MythTV using tv_grab_sd_json should be configured just like any other XMLTV grabber.
rmeden
SD Board Member
 
Posts: 1484
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: tv_grab_sd_json added to the XMLTV project

Postby bonelifer » Thu May 19, 2016 7:42 pm

It's pushing out "Original Airdate" as "2016" on every show and movie. First noticed it on Stargate SG-1, but it's doing it on all of them. Was not doing this when I used the mfdb-json utility. Another thing I noticed comparing MFDB-JSON filled EPG and tv_grab_sd_json EPG, they don't always have the same data(ie despite setting it to 30 days for both):

Jun 6, TNT: Rizzoli & Isles has two episodes:
Rizzoli & Isles: Two Shots: Move Forward (Program ID: EP012794650093)
Rizzoli & Isles: Dangerous Curve Ahead (Program ID: EP012794650094)


They show up under a mfdb-json run, but not after a tv_grab_sd_json run.

I'd assume since they are getting their data via the JSON service they should be getting the same exact schedule data.

It seems to always replace the channel logo on each import of the XML data, would it be possible to add a command line option, not to do this? Have a couple I use custom icons on. Also for some reason it's adding the logo for BOUNCE to MyNetworkTV(local callsign KARZ/KARZ42). The XMLTVID is correct in the DB and the LOGO img link is correct in the SRC in the XML files created by tv_grab_sd_json.

Code: Select all
  <channel id="17727">
    <display-name>KARZ</display-name>
    <display-name>KARZ</display-name>
    <display-name>003</display-name>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s51307_h3_aa.png" />
  </channel>


Code: Select all
  <channel id="55664">
    <display-name>KARZDT2 (KARZ-DT2)</display-name>
    <display-name>KARZDT2</display-name>
    <display-name>221</display-name>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s73067_h3_aa.png" />
  </channel>


Just realized I'm getting confused on what's updating the logo(ie mythfildatabase), though not sure why it's getting it wrong. Do you know if "--only-update-guide" would fix it updating the logo on EPG data import?
bonelifer
 
Posts: 24
Joined: Wed Sep 07, 2011 5:43 am

Re: tv_grab_sd_json added to the XMLTV project

Postby kgroeneveld » Sun Jun 05, 2016 5:32 pm

bonelifer wrote:It's pushing out "Original Airdate" as "2016" on every show and movie. First noticed it on Stargate SG-1, but it's doing it on all of them. Was not doing this when I used the mfdb-json utility.
I think this may actually be a bug in MythTV.

The XMLTV parser in MythTV sets the originalairdate from the XMLTV "previously-shown" tag:

Code: Select all
            else if (info.tagName() == "previously-shown")
            {
                pginfo->previouslyshown = true;

                QString prevdate = info.attribute("start");
                if (!prevdate.isEmpty())
                {
                    QDateTime date;
                    fromXMLTVDate(prevdate, date);
                    pginfo->originalairdate = date.date();
                }
            }


tv_grab_sd_json is outputting a full date for "previously-shown".

MythTV sets airdate based on the XMLTV "date" tag:

Code: Select all
            else if (info.tagName() == "date" && !pginfo->airdate)
            {
                // Movie production year
                QString date = getFirstText(info);
                pginfo->airdate = date.left(4).toUInt();
            }


But defaults airdate to the current year if it is not in the XML:

Code: Select all
    if (!pginfo->airdate)
        pginfo->airdate = current_year;


For non movies, tv_grab_sd_json leaves this field empty so MythTV will default airdate to the current year for non movies.

The MythTV web interface seems to prefer displaying airdate over originalairdate. Therefore it usually shows the erroneous current year instead of the previously-shown field from the XMLTV output. The internal SD-DD grabber of MythTV leaves the airdate field blank and the web interface then shows the correct originalairdate.

Or something like that, it was several months ago when I diagnosed this and can't seem to find my notes...
kgroeneveld
 
Posts: 20
Joined: Fri Oct 31, 2014 4:14 pm

Re: tv_grab_sd_json added to the XMLTV project

Postby Damstas » Sun Aug 07, 2016 8:40 am

I'm using MC2XML, but can't get any programme images. How can I receive them?
Damstas
 
Posts: 2
Joined: Tue Apr 21, 2015 4:12 am

Next

Return to SD-JSON service

Who is online

Users browsing this forum: No registered users and 1 guest

cron