Open Kick4U2 opened 4 years ago
This xmltv-to-mxf script needs to be able to extract a channel number from a display-name field for each channel.
Fortunately, XMLTV can have multiple display-name fields for each channel too, so you could edit the top of your xml to look something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<tv><channel id="Caracol.co">
<display-name lang="es">Caracol CO</display-name>
<display-name>1000</display-name>
<url>http://www.mi.tv</url>
<icon src="http://static.iptv-epg.com/co/Caracol.co.png"/></channel>
And then it should import as channel 1000. You can also use periods (1000.1) or dashes (1000-1) for channel grouping.
Thank you! This got me one step closer. I just added the channel number.
Unfortunately, I ran into this new error that doesn't seem to give me much to go off of:
C:\Windows\system32>java -jar C:\xmltv-to-mxf-0.0.3.jar M:\test.xml
2020-04-17 09:54:37,752 INFO - Starting with args=[M:\test.xml]
2020-04-17 09:54:37,772 INFO - XMLTV=M:\test.xml, MXF=mxf.xml
2020-04-17 09:54:38,312 INFO - Reading XMLTV file: M:\test.xml...100.00%
2020-04-17 09:54:38,312 INFO - Reading XMLTV file: M:\test.xml...100.00%
2020-04-17 09:54:38,312 INFO - Reading XMLTV file: M:\test.xml...100.00%
Reading XMLTV file: M:\test.xml...100.00%
Creating services2020-04-17 09:54:38,312 INFO - Creating services
2020-04-17 09:54:38,312 INFO - 1 channels
Creating lineup2020-04-17 09:54:38,312 INFO - Creating lineup
Generating basic MXF2020-04-17 09:54:38,442 INFO - Generating basic MXF
Beginning program parsing2020-04-17 09:54:38,452 INFO - Beginning program parsin
g
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner
.java:53)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArithmeticException: / by zero
at com.dontocsata.xmltv.XmlTvParser.main(XmlTvParser.java:223)
... 6 more
Caused by: java.lang.ArithmeticException: / by zero at com.dontocsata.xmltv.XmlTvParser.main(XmlTvParser.java:223)
There's the error (can't divide by zero), and location (line 223 of the file XmlTvParser.java). Apparently, if there are fewer than 100 programs in the file, it causes a "divide by zero" error when trying to print status updates to the console.
A easy workaround, if you don't want to recompile from source, is just adding more programs/channels to your XML file, so you have at least 100 programs. If you have more channels or listings you want to include, great! Or just add dummy placeholders until you get to 100 programs.
But for an actual fix, you would need to recompile after changing line 221 of src/main/java/com/dontocsata/xmltv/XmlTvParser.java from this:
int interval = storage.getXmlTvPrograms().size() / 100;
to something like this:
int interval = Math.max(storage.getXmlTvPrograms().size() / 100, 2);
(You can use any number greater than zero at the end, I just picked 2.)
FYI, compiling this project from source is pretty easy -- see this link for the instructions: https://github.com/raydouglass/xmltv-to-mxf/issues/1#issuecomment-570293858
Hello,
I've been a long time user of EPG123 and love it, but have a few channels that I'd like to have very basic title and description data from an XMLTV added to my guide within MCE.
I'm using an XML file that doesn't seem to work and I got this error initially:
Error parsing XMLTV: No support for: iepg
After removing the single line that included the iepg tag, I got this error:
Sorry for the long post with the XML file, but I couldn't upload XML files!