Need help with xmltv plugin please ! (1 Viewer)

dchabby

Portal Member
November 28, 2013
8
2
57
Home Country
Canada Canada
Hi - have been using mediaportal for awhile now to record ota but have just done manual recordings and never used any epg data.

Figured I would give that a try and am now stuck.

For the life of me I cant figure out how to get a copy of xmltv.dtd into the directory where my xml file is.

And I also cant figure out how to get my xml file to be named tvguide.xml.

I am using mc2xml to create the file and they say :
MediaPortal wants the produced .xml file to be called "tvguide.xml", so you must open a DOS box, change to the EPG data directory and specify the output filename on the mc2xml command line

Can anyone please walk me through these items ?
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    For the life of me I cant figure out how to get a copy of xmltv.dtd into the directory where my xml file is.
    AFAIK you don't need xmltv.dtd unless using WebEPG to get your XMLTV file. In other words, you don't need to worry about this.

    For the record (anybody else who is reading this thread)...
    xmltv.dtd can be downloaded from here:
    http://xmltv.cvs.sourceforge.net/viewvc/xmltv/xmltv/xmltv.dtd

    Put that file in the same folder that you intend to put tvguide.xml in.
    The folder really does not matter. It can be anywhere on your PC.

    And I also cant figure out how to get my xml file to be named tvguide.xml.

    I am using mc2xml to create the file and they say :
    MediaPortal wants the produced .xml file to be called "tvguide.xml", so you must open a DOS box, change to the EPG data directory and specify the output filename on the mc2xml command line
    The instructions are telling you to use mc2xml's -o output flag. I quote from mc2xml's website:
    -o <filename> set output file (default = "xmltv.xml")

    In other words, instead of running mc2xml.exe, you need to run "mc2xml.exe -o tvguide.xml".
     

    dchabby

    Portal Member
    November 28, 2013
    8
    2
    57
    Home Country
    Canada Canada
    For the life of me I cant figure out how to get a copy of xmltv.dtd into the directory where my xml file is.
    AFAIK you don't need xmltv.dtd unless using WebEPG to get your XMLTV file. In other words, you don't need to worry about this.

    For the record (anybody else who is reading this thread)...
    xmltv.dtd can be downloaded from here:
    http://xmltv.cvs.sourceforge.net/viewvc/xmltv/xmltv/xmltv.dtd

    Put that file in the same folder that you intend to put tvguide.xml in.
    The folder really does not matter. It can be anywhere on your PC.

    And I also cant figure out how to get my xml file to be named tvguide.xml.

    I am using mc2xml to create the file and they say :
    MediaPortal wants the produced .xml file to be called "tvguide.xml", so you must open a DOS box, change to the EPG data directory and specify the output filename on the mc2xml command line
    The instructions are telling you to use mc2xml's -o output flag. I quote from mc2xml's website:
    -o <filename> set output file (default = "xmltv.xml")

    In other words, instead of running mc2xml.exe, you need to run "mc2xml.exe -o tvguide.xml".

    Thanks for the answer but I am still a little confused.

    When setting up the xmltv plug in in tv-server configuration, it asks for the folder where the xml file is stored and says 'Please note that this folder should also include the xml.dtd file and doesn't say only when using webepg so are you sure I don't need it ?

    I am seeing an error under import status report that says 'tvguide.xml:invalid xml file:could not find file "C:\mc2xm' and is cut off so I don't know what else it says. Could it be related to this ?

    And as far as downloading xml.dtd - when I click on that link it just brings up a bunch of text and I don't know how to download this and get a copy of it to my computer. Can you please advise how this is done ?

    Thanks again !
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    When setting up the xmltv plug in in tv-server configuration, it asks for the folder where the xml file is stored and says 'Please note that this folder should also include the xml.dtd file and doesn't say only when using webepg so are you sure I don't need it ?
    Yes I'm 99.9% sure.

    Last year I rewrote large chunks of the XMLTV plugin to make it easier for people to use [with TVE 3.5]. One thing I did as part of that work was to remove the need for the xmltv.dtd file. Doing that required me to figure out when and why the DTD file was required.

    If you think I'm wrong, simply acquire DTD file as per the instructions that I supplied. It doesn't hurt to have it when it isn't required.

    I am seeing an error under import status report that says 'tvguide.xml:invalid xml file:could not find file "C:\mc2xm' and is cut off so I don't know what else it says. Could it be related to this ?
    Maybe, but unlikely.

    The TV service log and error log files will contain the full error text. Without access to those log files I can't tell for sure what the cause of the error is. However, I can speculate based on the most common mistakes that people make:
    • You've specified the full path to tvguide.xml (eg. c:\mc2xml\tvguide.xml) instead of just the folder name (eg. c:\mc2xml).
    • There is no tvguide.xml file in the folder that you've specified.
    • TV service and/or TV Server configuration don't have access to the folder that you've specified.

    And as far as downloading xml.dtd - when I click on that link it just brings up a bunch of text and I don't know how to download this and get a copy of it to my computer. Can you please advise how this is done ?
    Sure. There are several ways...

    1. Instead of left clicking on the link, right click and "save link as"... or whatever the save option happens to be for the Internet browser you're using. I use Firefox.
    ...OR...

    2. After clicking on the link:
    1. Select "file" (in the Internet browser top menu).
    2. Select "save page as" (or whatever the save option happens to be for the Internet browser you're using).
    3. Save as xmltv.dtd in the folder that you want it in.
    ...OR...

    3. After clicking on the link:
    1. Select all the text.
    2. Copy (ctrl + c).
    3. Open a new document in a text editor (notepad, wordpad etc.).
    4. Paste (ctrl + v).
    5. Save as xmltv.dtd.
     

    dchabby

    Portal Member
    November 28, 2013
    8
    2
    57
    Home Country
    Canada Canada
    The TV service log and error log files will contain the full error text. Without access to those log files I can't tell for sure what the cause of the error is. However, I can speculate based on the most common mistakes that people make:
    • You've specified the full path to tvguide.xml (eg. c:\mc2xml\tvguide.xml) instead of just the folder name (eg. c:\mc2xml).
    • There is no tvguide.xml file in the folder that you've specified.
    • TV service and/or TV Server configuration don't have access to the folder that you've specified.

    OK - not sure if this is right but I pulled this from one of the logs I found :

    [2015-04-06 22:36:30,827] [Log ] [SetupTv ] [ERROR] - XML tv import error loading C:\mc2xml\tvguide.xml err:Could not find file 'C:\mc2xml\xmltv.dtd'.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
    at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
    at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
    at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)
    at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
    at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
    at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.PushExternalSubset(String systemId, String publicId)
    at System.Xml.DtdParser.ParseExternalSubset()
    at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
    at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
    at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)
    at System.Xml.XmlTextReaderImpl.ParseDtd()
    at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at System.Xml.XmlReader.ReadToDescendant(String name)
    at TvEngine.XMLTVImport.Import(String fileName, Boolean deleteBeforeImport, Boolean showProgress)

    and thanks - I was able to download the dtd file.
     

    Attachments

    • upload_2015-4-6_22-57-58.png
      upload_2015-4-6_22-57-58.png
      190.2 KB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Right, so I was wrong:
    Could not find file 'C:\mc2xml\xmltv.dtd'.

    Sorry.
    Is the import working now that you have the dtd file?
     

    dchabby

    Portal Member
    November 28, 2013
    8
    2
    57
    Home Country
    Canada Canada
    Right, so I was wrong:
    Could not find file 'C:\mc2xml\xmltv.dtd'.

    Sorry.
    Is the import working now that you have the dtd file?

    Yes thanks - looks like I got it working !!

    Now for the next tricky part - I am in Toronto Canada and a lot of the stations I get are from Buffalo NY and my tvguide file only has the Toronto listings.

    Somehow I need to grab 2 different guide listings and have them both used - does this seem possible ?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Somehow I need to grab 2 different guide listings and have them both used - does this seem possible ?
    I think this is really a question for somebody who is more familiar with mc2xml than I am. If I had to guess...

    From the information on mc2xml's homepage:
    http://mc2xml.hosterbox.net/

    ...I would guess that the DAT file created by mc2xml contains the download/grab settings.

    I can see that it is possible to use the -D flag/option to specify which DAT file mc2xml loads when it does a grab:
    -D <filename> set dat filename (default = "mc2xml.dat")

    I can also see that it is possible to use the -I flag/option to include an XMLTV file in the output:
    -I <xmltv file> include <xmltv file> in output

    So, if I were you I would try the following:
    1. Rename/save your current DAT file which I presume is for Toronto as toronto.dat (or whatever).
    2. Create a new DAT file - buffalo.dat (or whatever) - for Buffalo by running and configuring mc2xml.
    3. Create a BAT (task) file - collect_my_epg.bat (or whatever) - with the following actions:
      1. Run a grab with the Toronto settings (mc2xml.exe -D toronto.dat -o toronto.xml).
      2. Run a grab with the Buffalo settings, and include toronto.xml in the output (mc2xml.exe -D buffalo.dat -o tvguide.xml).
    4. Run the BAT file using the Windows command line (DOS box). Just enter the name of the BAT file and press enter.
    5. Assuming the previous steps worked correctly, try to configure TV Server's XMLTV plugin to import and use the combined tvguide.xml.
    Note that a BAT file is just a regular text file containing Windows command line (DOS box) commands (one line per command) with a .bat extension instead of a .txt extension. You can create one with any text editor - notepad, wordpad etc.

    If it turns out that mc2xml can't successfully combine the two XML/XMLTV files, TV Server's XMLTV plugin can be configured to import more than one tvguide.xml through use of a tvguide.lst file. It is probably easier to try doing the combining with mc2xml first.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    First of all, I'm not using MP1 or mc2xml any longer so probably my knowledge is a bit outdated. As far as I know MP needs a modified version of the xmltv.dtd . But the good news is, this file is delivered with MP1 TV Server and also with MP2, at least if you are using TVE 3.0. It can be found in Program Data folder of the TV Engine and there in a sub- folder xmltv.

    Somehow I need to grab 2 different guide listings and have them both used - does this seem possible ?
    Yes, this is possible. I've used mc2xml until a year ago. Now I'm using WebGrab+Plus instead, as it delivers better and more reliable data for Germany than mc2xml. But mc2xml is faster a lot. With mc2xml I was using two different listings for Germany (SAT and cable) to get as much programs as I need. This is saved in the mc2xml.dat that is generated on first run of mc2xml.exe. But I don't remember how to do this as I only did this once a very long time ago (the time I first used this) and then saved the whole folder with all config and batch for multiple usage and never touched it again. But I can remember that it was described how to do so on the mc2xml website. So best is to have a look at the mc2xml website and try to read and understand as much as possible.
     

    Users who are viewing this thread

    Top Bottom