raydouglass / xmltv-to-mxf

Converts XMLTV to WMC MXF format
GNU General Public License v3.0
6 stars 3 forks source link

Program fails with period subchannels #1

Closed tonywagner closed 4 years ago

tonywagner commented 4 years ago

If the input xml has period subchannels (like "2.1") instead of dashes ("2-1"), this program fails with "No acceptable channel number found".

Fortunately, it's a pretty easy fix in src/main/java/com/dontocsata/xmltv/model/XmlTvChannel.java -- change

private static Pattern channelSubPattern = Pattern.compile("(\\d+)\\-(\\d+)");

to

private static Pattern channelSubPattern = Pattern.compile("(\\d+)[\\-\\.](\\d+)");

and it should support both!

2celtics commented 4 years ago

@tonywagner

How did you get the project to compile? Mine shows lots of missing classes... For example, these to name a few:

com.dontocsata.xmltv.mxf.Channel;
com.dontocsata.xmltv.mxf.Lineup;
com.dontocsata.xmltv.mxf.Lineup.Channels;
com.dontocsata.xmltv.mxf.MXF;
com.dontocsata.xmltv.mxf.MXF.With.ScheduleEntries;

Is there a process to generate these somehow before compiling the jar?

tonywagner commented 4 years ago

@2celtics

I describe my build process here: https://www.thegreenbutton.tv/forums/viewtopic.php?p=133887#p133887

raydouglass commented 4 years ago

This is fixed in v0.0.2. You can download it here: https://github.com/raydouglass/xmltv-to-mxf/releases/tag/v0.0.2

raydouglass commented 4 years ago

Is there a process to generate these somehow before compiling the jar?

This project uses maven to build. You can build the project on the command line like so:

mvn clean package

The resulting jar will be in the target/ directory.