EPG Data - Schedules Direct (1 Viewer)

southpaw

New Member
December 9, 2015
3
3
Home Country
United States of America United States of America
Greetings all,

I am new to MediaPortal having recently installed it as a possible future replacement to WMC. After a bit of work and the fine help available online I have the system up and running and recording OTA - USA broadcasts. I have MCEBuddy watching the recorded TV folder, stripping commercials, converting to MP4 and storing the resulting file in a Plex media server folder.

I am using schedules direct for guide data and I ran into an issue where the recoded program XML file list the episode number as (for example) Episode: 512 rather than Season: 5 Episode: 12. I can get around this using the SchedulesDirect EPG Client plugin by ticking the option to fetch season and episode data from TheTVDB.com. I would however prefer not to use this plugin but I have not been able to figure out how to get around this issue using the XmlTV plugin. I feel it necessary to overcome this issue if I ever want to switch to MP2. I wrote to Schedules Direct support and got the following response.

  • > I am trying to use Mediaportal 1.12.0 with the XmlTV plugin and
  • > Schedules Direct for OTA broadcast in Milwaukee Wisconsin.
  • > Unfortunately the data comes across for example as Episode:512
  • > rather than Season:5 Episode:12.

  • The JSON service has proper Season / Episode information; the XML service doesn't. (The XML service provider never actually included S/E, just "production codes", which aren't the same thing.)

  • I don't know if Mediaportal has support for the JSON service; have you asked in the MePo Newcomer's forum?

Any guidance would be greatly appreciated.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello and welcome :)

    With MediaPortal TV Server's XMLTV plugin it is "garbage in, garbage out". Our plugin does not directly communicate with SchedulesDirect, so you must be using some other program (mc2xml???) to get the tvguide.xml file, right? That being the case, you should be asking whether that other program uses the JSON or XML service, and looking at whether it formats the season/episode information correctly in the tvguide.xml it creates.

    Hope that helps,
    mm
     

    southpaw

    New Member
    December 9, 2015
    3
    3
    Home Country
    United States of America United States of America
    You are exactly correct. I got hung up on the fact that both the Schedules direct plugin and the XmlTV process had the same issue. Thanks to your guidance I have popped over to the mc2xml website and found the following under options.

    • -J <user>:<pass> use schedules direct json service
    I will dig into this more when I get some time to mess with settings again.

    Many thanks for your help and the quick response, pointing me in the right direction.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I got hung up on the fact that both the Schedules direct plugin and the XmlTV process had the same issue.
    This may well indicate that the SchedulesDirect data that the plugin (which uses the XML service) and mc2xml (which can use either the JSON or XML service) are pulling contains bad data. Maybe "production codes" as the folks at SD previously indicated. At least now you know you can look at the content of the mc2xml output (tvguide.xml can be opened in any internet browser or text editor - notepad, wordpad etc.) and see whether using the XML and JSON services gives you different results.
     

    southpaw

    New Member
    December 9, 2015
    3
    3
    Home Country
    United States of America United States of America
    I got hung up on the fact that both the Schedules direct plugin and the XmlTV process had the same issue.
    This may well indicate that the SchedulesDirect data that the plugin (which uses the XML service) and mc2xml (which can use either the JSON or XML service) are pulling contains bad data. Maybe "production codes" as the folks at SD previously indicated. At least now you know you can look at the content of the mc2xml output (tvguide.xml can be opened in any internet browser or text editor - notepad, wordpad etc.) and see whether using the XML and JSON services gives you different results.

    Indeed. It took a bit of work to figure this out but the end result for one particular episode of the TV Show "Coach" is as follows...

    XML
    <episode-num system="onscreen">66618</episode-num>
    <episode-num system="dd_progid">EP00000976.0003</episode-num>

    JSON
    <episode-num system="dd_progid">EP00000976.0003</episode-num>
    <episode-num system="xmltv_ns">2.12.</episode-num>

    I'm not sure how this difference will affect the guide. More testing required. :)

    For any other users that happen upon this thread, I hope the following will save you the headaches I just went through.

    There is an issue with using the -J option or selecting the Schedules Direct JSON option from the UI when running mc2xml for the first time. The program runs and exits without creating any data. Running mc2xml from a command prompt reveals the following error.
    Error: Did not receive User-Agent in header. See https://github.com/SchedulesDirect/JSON-Service/wiki/API-20141201#tasks-your-client-must-perform

    To solve this .............
    Delete mc2xml.dat from your xmltv folder if it already exists
    run mc2xml from a command prompt as follows.

    Open command prompt and change to the directory where mc2xml is located (for example "CD\ProgramData\Team MediaPortal\MediaPortal TV Server\xmltv")
    Enter the following commands ....
    set USERAGENT=email
    mc2xml

    Select your options from the mx2xml UI and click the OK button.
    Your guide data will be downloaded and a new mc2xml.dat file will be created.

    I am not sure if the environment variable "USERAGENT" will need to be set each time you run mc2xml to update the guide data but I plan on doing so just in case.
     

    EW Thomas

    Portal Pro
    January 5, 2016
    51
    2
    59
    Southwestern Virginia
    Home Country
    United States of America United States of America
    Good information Thanks!
    I am using the SD data as well but have been told that a lineup closer to what I need is in the json service.
    Currently using MC2XML to grab data. What all is needed on my end to process the JSON data? Or does MP support that format?

    Thanks in advance for any help!
     
    Last edited:

    EW Thomas

    Portal Pro
    January 5, 2016
    51
    2
    59
    Southwestern Virginia
    Home Country
    United States of America United States of America
    I have been playing with pulling data this evening but for some stupid reason I can't seem to open M2XML using CMD.
    Regardless of trying different syntax it always errors out with 'The System Is Unable To Find Path"
    I have it located in /Program Files(X86)/M2XML Should I locate it somewhere else??
    Stumped at the moment LOL!

    Thanks

    Wayne
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Have you got quotation marks (") around your path, like this:
    "c:\Program Files (x86)\M2XML\mc2xml.exe"

    If not, the spaces (eg. in Program Files) will cause problems.

    Also, are you sure you haven't made a type (eg. M2XML instead of MC2XML)?
     

    EW Thomas

    Portal Pro
    January 5, 2016
    51
    2
    59
    Southwestern Virginia
    Home Country
    United States of America United States of America
    Thanks for the schooling :) I actually had 2 stupid mistakes.. One I forgot the " on the start and second I had the directory folder
    incorrectly spelled so if I had placed the " in the proper location it never could have worked :)

    Guess that's what I get for getting in a hurry to make JSON work with MP LOL!
    It's been so long since I worked with anything like this I have just about forgotten what
    I learned a bazillion years ago :)


    Thanks!
     
    Last edited:

    Users who are viewing this thread

    Top Bottom