You are here

Problems merging 2 xmltv files

5 posts / 0 new
Last post
GeeDee
Offline
Joined: 7 years
Last seen: 7 years
Problems merging 2 xmltv files

Hi there,

First off, great utility thanks alot for making this.

I am currently using TVHeadend and have two IPTV networks loaded. One has its own XMLTV file provided, whilst the other has no guide. For the one with no guide I'm using WG+ to grab the EPG which is working geat however I'm keen to merge this with my other providers existing xmltv file.

The issue I'm seeing is the channels in merge-xmltv.channels.xml are either incomplete or the channel maps to an incorrect site id. Through some trial and error I was able to narrow down the issue to my external xmltv guide not having the lang="en" syntax in the <display-name> tag. Once I added this to each channel on my external xmltv file, the merge went through without a hitch.

Is there anything I can modify in the ini file that could help me get around this?

If the intentions of merge-xmltv was only to merge 2 files created by WG++ thats fine, but thought I'd try my luck anyway. Thanks again

G

GeeDee
Offline
Joined: 7 years
Last seen: 7 years

Sure thanks. Heres a sample from testing:

Guide1.xml (Webgrab file)

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version  V2.0 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="Sydney - 7flix">
    <display-name lang="en">Sydney - 7flix</display-name>
    <url>http://www.freeview.com.au</url>
  </channel>
  <channel id="Sydney - 7mate">
    <display-name lang="en">Sydney - 7mate</display-name>
    <url>http://www.freeview.com.au</url>
  </channel>

Guide2.xml (external source)

<?xml version="1.0" encoding="ISO-8859-1"?>
<tv date="20170314070020 +0000" source-info-url="http://freepg.tv" source-info-name="freePG.tv Australian xmltv feeds for NSW - Sydney." generator-info-name="freePG.tv xmltv generator." generator-info-url="http://freepg.tv">
<channel id="ABC2"><display-name>ABC2/KIDS</display-name></channel>
<channel id="ABC3"><display-name>ABC ME</display-name></channel>

merge-xmltv.channels.xml

<?xml version="1.0" encoding="UTF-8"?>
<site generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version  V2.0 -- Jan van Straaten" site="merge-xmltv">
  <channels>
    <channel update="i" site="merge-xmltv" site_id="Sydney - 7flix" xmltv_id="Sydney - 7flix">Sydney - 7flix</channel>
    <channel update="i" site="merge-xmltv" site_id="Sydney - 7mate" xmltv_id="Sydney - 7mate">Sydney - 7mate</channel>
  </channels>
</site>

 

 

GeeDee
Offline
Joined: 7 years
Last seen: 7 years

Sorry posted before I seen your reply.

Yes went with option 2 as suggested and working perfectly. Thanks! :-)

Kick4U
Offline
Donator
Joined: 6 years
Last seen: 5 months

I had the same problem from an imported xml file, but I have one more issue on top of it from WebGrab made files too!

For reference, the attribute for 'channel id' cannot have a space.  I need to remove all spaces and characters "()," from my WebGrab config file under the "site_id" tag so that it would produce the correct xml for merge-xmltv to work.

This doesn't work:
<channel update="i" site="merge-xmltv_" site_id="Bravo HD (BRVOHD)" xmltv_id="Bravo HD (BRVOHD)">Bravo HD (BRVOHD)</channel>

 

This does:
<channel update="i" site="merge-xmltv_" site_id="BravoHDBRVOHD" xmltv_id="Bravo HD (BRVOHD)">Bravo HD (BRVOHD)</channel>

Any ideas why this is happening?

 

 

Kick4U
Offline
Donator
Joined: 6 years
Last seen: 5 months

Fantasitc!  It's working... of coursewink.

Here's the updated ini for future reference with both fixes you mentioned above.

Thank You!!!

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl