XmlTvImporter ignores duplicate channels (1 Viewer)

UncleRedz

New Member
June 12, 2007
2
0
Home Country
Sweden Sweden
TV-Server Version: tvengine3-06-20-2007--01-21h--Rev14932
MediaPortal Version: MediaPortal-svn--06-20-2007--00-59-Rev14932
1. TV Card: Hauppauge WinTV-PVR500
1. TV Card Type: Analog with dual tuners
1. TV Card Driver: Latest
2. TV Card: FireDTV
2. TV Card Type: DVB-C
2. TV Card Driver: Latest
Satelite/CableTV Provider: ComHem

Through my cable TV provider I have a number of analog channels, for example "SVT1" and I have a number of digital channels as well, including a digital version of "SVT1".

So what I end up with is two different channels with the same display name, "SVT1" but different channel ID's.

When XmlTvImporter then reads the tvguide.xml and starts to import the programs, it enumerates the list of channels and stops at the first occurens of a matching display name and then assigns the program to this channel. In other words any other channels with a matching display name that may appear after the first one is never used and no programs are assigned to that channel.

So if the digital channel is first in the database table, the digital version of "SVT1" gets the program information and the analog version is blank. If the analog version is first in the database, the digital version will be blank.

I'm not including any logs, since it's quite clear that this is what happens when reading the source file. (See Plugins/XmlTvImport/XMLTVImport.cs, revision 14942.)

Is this a bug or do I have the channels configured incorrectly?

(I'm not using the EPG from the digital channels since they are less usefull than the information that can be obtained using XMLTV.)

Thankfully the source is rather straight forward, so I'll try to fix it and then post the fix here, if it's considered a bug that is. :)

Cheers,
RedZ
 

UncleRedz

New Member
June 12, 2007
2
0
Home Country
Sweden Sweden
Ok, here's a patched version. Basicly I just made sure that all channels in the DB were checked instead of stopping at the first matching channel.

I did however comment out a section that adds a new "dummy" channel into the database if the XMLTV channel couldn't be matched to a channel in the DB.

I could not see the purpose of doing this, and I belive it's also what's causing the issues described here, this happened to me as well with the unpatched XMLTVImporter. I may be wrong about doing this, so please add it back in if it serves a purpose.

The attachement contains the modified source file and a patch for this file and the revision I got from SVN. The log contains the output from when the patched importer imports a new tvguide.xml.
 

trevor

Portal Pro
October 17, 2006
1,600
950
Chelmsford
Home Country
United Kingdom United Kingdom
Ah..the dummy functionality is useful when you start from scratch with analog channels via a STB for example. The quickest way to get the channels in is to build a TVGuide.xml, I use XMLTV GUI, and let MP import it. Of course you the have to go manually through all channels and set the stb channel number, counrty and video output...or in my case run some sql scripts.

Granted it is not something you have to do often...but if can't scan to add channels it is the best option.....
 

Users who are viewing this thread

Top Bottom