mc2xml - what are your usage tips & tricks .. (1 Viewer)

incogito

Portal Member
April 17, 2009
20
2
Home Country
France France
Explanation about mc2xml

Installed in "C:\Program Files\mc2xml"
Create a batch command mc2xml.cmd
c:
cd \Progra~1\mc2xml
del mc2xml.dat
del tvguide*.*
mc2xml.exe -c fr -g 10000 -a -A -D freebox.dat -o tvguide_tmp.xml
mc2xml.exe -c fr -g 10000 -a -A -D tnt.dat -I tvguide_tmp.xml -o tvguide.xml
copy /Y tvguide.xml C:\Progra~1\Forthe~1\Services\XMLTV
copy /Y tvguide.xml C:\Progra~1\XMLTV
Why?
-c fr = france
-g 1000 = Postalcode (not specific)
-a append " *" to new programs
-A append " *" to live programs
-D <filename> set dat filename (default = "mc2xml.dat") here 2 different ones
-o <filename> set output file (default = "xmltv.xml")
-I <xmltv file> include <xmltv file> in output

How to get "mc2xml.dat" information
delete "mc2xml.dat" if exist or it launch without interactive process and use dat config
When launching "mc2xml.exe -c fr -g 10000" - you get
  1. 1st popup window to confirm (Service, Options, P/Z code & Country Code)
  2. 2nd popup window "Lineup Selection" with a list of (for me 20 lineup) You must choose ONE and only one
  3. and it create a "mc2xml.dat" withe the referencing parameter for this choice
Ex: if i choose "Atlantic Bird 3 (AB3)" lineup = I get in the "mc2xml.dat" : 2 lines
Atlantic Bird 3 (AB3)
Gv4u2nAoGKbAbw75LWSyp6/ZK+0nQIzis6xkoUURTt+AN5pGodHh6ztqvHtdNQDY

Now, i can rename "mc2xml.dat" in "AB3.dat" and use it later like in :
"mc2xml.exe -c fr -g 10000 -a -A -D ab3.dat -o tvguide_ab3.xml"

If i want more than one Lineup OR channel coming from multiple lineups
Sol1 - Concatenate successive mc2xml.exe 2 lineups "9 Freebox V (CAB) + 16 TNT (TER)"

  1. i proceed twice to obtain the "mc2xml.dat" that i rename as freebox.dat and "tnt.dat"
  2. in ".cmd" mc2xml.exe -c fr -g 10000 -a -A -L -D freebox.dat -o tvguide_tmp.xml = Obtain Guide data for the Freebox lineup & save in tvguide_tmp.xml
  3. in ".cmd" mc2xml.exe -c fr -g 10000 -a -A -L -D tnt.dat -I tvguide_tmp.xml -o tvguide.xml = Obtain Guide data for the Tnt lineup & include the tvguide_tmp.xml & save the all in tvguide.xml

.. so on . you can combine multiple lineups .. lineup are interesting because it's a simple file download (very speed) because those lineups are produced and stored oon the mc2xml microsoft servers

Sol2 - use a list of channel you want and put them in
If you only want to include certain channels in your xml file you can create a "mc2xml.chl" text file (in the same directory as mc2xml.dat) listing the channel numbers, channel number ranges, channel names, or channel ids on separate lines: Example
"mc2xml.chl "
5
9-15
17-21.2
HBO
BBC2 London
I20.515292.microsoft.com
I51.5.34392.tmsdatadirect.com
I54.3.3945.titantv.com

You can choose for the ".chl" name
  • "mc2xml.chl" by default
  • use (-C <filename>) to set channel specific file (The default = "mc2xml.chl")

How to know the information needed
(1) look inside the output of "mc2xml.exe" in "tvguide.xml" - you will find something like :
tv source-info-name="BDS" generator-info-name="mc2xml" generator-info-url="mailto:mc2xml@gmail.com">
<channel id="I2.751945.microsoft.com">
<display-name>2 ARTE</display-name>
The <channel id="I2.751945.microsoft.com"> is the one to put inside your "mc2xml.chl"

(2) With For The Record " Management Console / Administration / Guide Channel "
- "External ID" = <channel id="I2.751945.microsoft.com">
- "Guide channel Name" = <display-name>2 ARTE</display-name>

Extract from Database to produce a 'tvguide.chl'
Is it possible to make a Sql Request on the Database and produce "*.ren" & "*.chl"
Copy them to the "..\mc2xml" Directory and use it like that
"mc2xml.exe -c fr -g 10000 -C tvguide.chl -o tvguide.xml"

Renaming Channel Name in mc2xml
If you want to rename channels by numbers or names you can create a "mc2xml.ren" text file (in the same directory as mc2xml.dat) listing the colon separated from:to channel numbers or names on separate lines: the "from" can also be a channel id, to distinguish duplicate channel numbers or names)
mc2xml.ren
605:2
BBC1:BBC News
I20.515292.microsoft.com:55
You can also produce a Sql request to produce "tvguide.ren"
I'll come back to specify the sql request later ..

that's all folks ..
 

moab

Portal Pro
April 22, 2008
250
9
California
Home Country
United States of America United States of America
this helped me a little but I still can't get it to load up

Is it at least pulling the data?
Where is it failing?

Works fine for me.
I have it going with Schedules Direct for the EPG data.
Then use XMLTV plugin to map the channels to the guide data.
 

Shadowmeph

Portal Member
July 25, 2009
40
0
Home Country
Canada Canada
I am a noobie so forgive me is if seems like a stupid question but what do you mean by pulling the data.
I originaly was trying the xmltv plugin but when I went into the tv servers mapping I couldn't get the guide to work which left all the channels in red. but using your guide here I was able to pull up the guide for all the channels that I selected , I just am not sure how to get the information to show up in mp. when I go back to the settings ( inside the tv servers xmltv and try to import I notice an error at the bottoms saying "tvguidexml:invalid XML file unexpected end of the file..." I cannot see the rest of the file.
here is my tv server error log.
Code:
   1.
      2009-09-01 18:17:18.952500 [12]: Controller: Error on delete in CleanTimeshiftFiles
   2.
      2009-09-01 18:17:19.161500 [12]: Controller: Error on delete in CleanTimeshiftFiles
   3.
      2009-09-01 18:37:10.422500 [SetupTv]: XML tv import error loading C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.xml err:Unexpected end of file has occurred. The following elements are not closed: channel, tv. Line 192, position 1.
   4.
          at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   5.
         at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   6.
         at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg)
   7.
         at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()
   8.
         at System.Xml.XmlTextReaderImpl.ParseElementContent()
   9.
         at System.Xml.XmlTextReaderImpl.Read()
  10.
         at System.Xml.XmlTextReader.Read()
  11.
         at System.Xml.XmlSubtreeReader.Read()
  12.
         at TvEngine.XMLTVImport.Import(String fileName, Boolean showProgress)
  13.
      2009-09-01 18:37:32.894500 [5]: plugin:xmltv StartImport - File [C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.lst] doesn't have read access : Could not find file 'C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.lst'.
  14.
      2009-09-01 18:37:39.231500 [SetupTv]: XML tv import error loading C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.xml err:Unexpected end of file has occurred. The following elements are not closed: channel, tv. Line 192, position 1.
  15.
          at System.Xml.XmlTextReaderImpl.Throw(Exception e)
  16.
         at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
  17.
         at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg)
  18.
         at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()
  19.
         at System.Xml.XmlTextReaderImpl.ParseElementContent()
  20.
         at System.Xml.XmlTextReaderImpl.Read()
  21.
         at System.Xml.XmlTextReader.Read()
  22.
         at System.Xml.XmlSubtreeReader.Read()
  23.
         at TvEngine.XMLTVImport.Import(String fileName, Boolean showProgress)
  24.
      2009-09-01 18:38:32.906500 [4]: plugin:xmltv StartImport - File [C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.lst] doesn't have read access : Could not find file 'C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.lst'.
  25.
      2009-09-01 18:39:32.913500 [4]: plugin:xmltv StartImport - File [C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.lst] doesn't have read access : Could not find file 'C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.lst'.
  26.
      2009-09-01 18:40:33.310500 [XmlTvImporter]: XML tv import error loading C:\Program Files\Team MediaPortal\MediaPortal\xmltv\tvguide.xml err:Unexpected end of file has occurred. The following elements are not closed: channel, tv. Line 192, position 1.
  27.
          at System.Xml.XmlTextReaderImpl.Throw(Exception e)
  28.
         at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
  29.
         at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg)
  30.
         at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()
  31.
         at System.Xml.XmlTextReaderImpl.ParseElementContent()
  32.
         at System.Xml.XmlTextReaderImpl.Read()
  33.
         at System.Xml.XmlTextReader.Read()
  34.
         at System.Xml.XmlSubtreeReader.Read()
  35.
         at TvEngine.XMLTVImport.Import(String fileName, Boolean showProgress)
 

Users who are viewing this thread

Top Bottom