xmltv 2 ? (source + binary now available) (1 Viewer)

Laban

Portal Pro
July 1, 2007
206
18
Luleå
Home Country
Sweden Sweden
Thanks infinity..

Made some updates. Improved the import so that it now handles multiple channels being mapped to the same guide channel. I know that some people have requested this, it's also a feature that i'm going to use myself because there are channels that are available both as regular and HD versions now.

Should also be a lot faster. Well, at least a lot faster then my initial version that handled multiple channels -> guide :)

And a question, how do you handle batched inserts in the Gentle framework ? Could potentially speed up the import quite a bit. Had a quick look at the docs and didn't find anything. Not that it matters that much though, especially not with the added 10 ms delay for each save. Not sure why that's in there, though a guess would be to make the import run a bit more "silently".
 

kellizer2

Portal Member
December 3, 2006
42
0
Looks great Laban; will give it a go – small suggestion could be that you allow for the mapped XMTV channels to be exported to the clipboard (or file) so that you can paste them into the .conf file (e.g. tv_grab_uk_rt.conf) – this would allow for the xmltv process only to grab the xmltv channels for the 1’s that have been mapped in MP and MP will not import the “rogue” channels.

Keep up the great work

Ian.
 

Laban

Portal Pro
July 1, 2007
206
18
Luleå
Home Country
Sweden Sweden
Looks great Laban; will give it a go – small suggestion could be that you allow for the mapped XMTV channels to be exported to the clipboard (or file) so that you can paste them into the .conf file (e.g. tv_grab_uk_rt.conf) – this would allow for the xmltv process only to grab the xmltv channels for the 1’s that have been mapped in MP and MP will not import the “rogue” channels.

Keep up the great work

Ian.

MP + this plugin doesn't import channels without an existing mapping. Unless the name matches perfectly with an existing channel. Edit: Or perhaps i should say that the import itself doesn't import channels like the standard xmltv plugin does, unless there isn't an existing mapping and the name in MP matches the guidename exactly. I guess it's not exactly a import either, it just maps it automatically to the existing MP channel.

Though i wonder if it wouldn't be a good idea to actually remove that "feature". Don't really see a reason for using it since it's so easy to do the mappings. Especially if you know that the names in the guide matches exactly with the autotune names.

But it would perhaps still be a good idea to have a export feature. Would speed up the grabbing a bit. Not that it's really a performance issue (guess the same could be for the actual import), but it can't hurt..
 

Hemin

Portal Pro
December 29, 2006
59
4
Home Country
Spain Spain
I know that this is an alpha version yet, but is there any possibility to "refresh" the MP database.program before import the xmltv file, like the manual
"refresh epg"? It will solve the "problem" that the xmltv plugin only update the new last days and the information from the first days remain inaccurate due the old data. Enable/disable this feature with a checkbox would be great.

Until now i do it automatically with a .bat file with this command:

sqlcmd -S localhost\SQLEXPRESS -U sa -P xxxx -Q "DELETE FROM TVLIBRARY.DBO.PROGRAM"
 

Laban

Portal Pro
July 1, 2007
206
18
Luleå
Home Country
Sweden Sweden
I know that this is an alpha version yet, but is there any possibility to "refresh" the MP database.program before import the xmltv file, like the manual

Available now.

Looks great Laban; will give it a go – small suggestion could be that you allow for the mapped XMTV channels to be exported to the clipboard (or file) so that you can paste them into the .conf file (e.g. tv_grab_uk_rt.conf) – this would allow for the xmltv process only to grab the xmltv channels for the 1’s that have been mapped in MP and MP will not import the “rogue” channels.

You got it. Though i didn't bother to do a merge with the existing conf. Or rather, that you could just save the file over the existing conf and it would just replace all the channel=.. rows. Perhaps if you say pretty please :) Though i'm not sure that you really need this functionality with this plugin, since it doesn't map any channels automatically, nor creates them, see below:

I also removed the automatic mapping of channels (name) so no channels are added unless you've mapped them yourselve. Didn't see a need for that since it's so easy to do the mappings.. It also won't overwrite any of the manually done mappings which it potentially could do.
 

kellizer2

Portal Member
December 3, 2006
42
0
Genius!!!! I have another few suggestions that maybe of interest to you.

Does it match all display names in the XMLTV channel node against the mediaportal name? I recall the original plugin only matched the first displayname, so if the matching XTLTV channel name was the second displayname node then it was not matched to the MP channel.

Also, it would be sweet to allow for near match algorithms to analysis the comparisons between the channel names in Mediaportal and in that of the xmltv file. Basically, nothing complex but what I am thinking of a decorator style pattern on where you have a drop down combobox with different algorithms that can run against the datasets to see if you can have a comparative match between unconnected TV Channels.

E.G.

Title Match, whitespace trim – put both the MP Channel and the xmltv channel into lower case & trim the white spaces - the would mean that if the MP Channel is called BBC 3 and the XMLTV Channel was bbc3 then both would match. For some reason; the channels in the UK have spaces and whitespace mismatch.

The reason i suggest to allow for a collection of algorithms that other people could write there own matching patterns between the channels.

Obviously this is simply to aid in the setup time in the mapping between the channel – but does help if you have >200 channels. What do you think?

Do you update the original binaries at the start of the post?

If there is anything that I can do then give me a shout but I’m a java programmer by trade but never scared to have a go with C#.

Cheers,

Ian
 

EpaL

Portal Member
July 4, 2007
8
0
Hi Laban,

Firstly, thank you so much - this plugin is exactly what I needed. I've been struggling with the XmlTV plugin that comes with TVE3 and have so far had very limited success. Specifically, it doesn't seem to handle timezone adjustment very well.

I've got your plugin almost working perfectly, except for one small detail: It keeps repeating the import process over and over. Every time I exit the management console and come back in, it's done another import. When i'm browsing the channel guide in Media Portal, all of a sudden all the shows disappear and then slowly come back. Something seems to be triggering the import process. I assumed it was the timestamp on the tvguide.xml file, but this is definitely in the past (and i'm not updating it).

Just out of interest, does it force an import each time you click OK in the TV Server Configuration window? Perhaps it's me jumping in and out forcing the reload?
 

Hemin

Portal Pro
December 29, 2006
59
4
Home Country
Spain Spain
I know that this is an alpha version yet, but is there any possibility to "refresh" the MP database.program before import the xmltv file, like the manual

Available now.

Thank you very much Laban!!

I sent to you a mail with bug reporting on 8 Jul but i recived a delayed delivery warning today (?¿). So I put here the bugs i found:

Here are some bugs i find with a little plugin test:

- The xmltv browse button on the main screen don't work. (explorebutton.jpg)

- I always get a "Save Failed" error with the green bar process at about 35% (savefailed.jpg). The changes are saved partially.

- Can't save changes made to the channels that are previously changed. For example, i want to change the PLAYBOY :)D) channel guide wrong associated to PLAYINTV to a empty channel guide. When I press the save button i get a "save failed" error instantaneously with the bar process at de 0%.
- Noticed that xmltv imported the xmltv guide every 3-5 minutes automatically.

Hope this plugin get full funished soon.

Code:
08/07/2007 20:22:10 5 RemoteControl: Error getting server Instance - Requested Service not found
08/07/2007 20:24:01 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:01 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:02 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:02 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:02 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:02 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:02 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:02 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:03 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:03 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:03 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:03 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:03 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:03 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:10 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:10 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:34 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:34 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:35 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:35 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:35 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:35 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:35 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:35 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:35 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:35 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)
08/07/2007 20:24:35 1 Error while saving channelmappings : Object reference not set to an instance of an object.
08/07/2007 20:24:35 1    at SetupTv.Sections.XmlSetup.buttonSave_Click(Object sender, EventArgs e)

:D
 

Laban

Portal Pro
July 1, 2007
206
18
Luleå
Home Country
Sweden Sweden
I sent to you a mail with bug reporting on 8 Jul but i recived a delayed delivery warning today (?¿). So I put here the bugs i found:

Here are some bugs i find with a little plugin test:
- Can't save changes made to the channels that are previously changed. For example, i want to change the PLAYBOY :)D) channel guide wrong associated to PLAYINTV to a empty channel guide. When I press the save button i get a "save failed" error instantaneously with the bar process at de 0%.

Try with the latest version (see original post with the XmlTvImport.zip). Should work, let me know if it doesn't.

- Noticed that xmltv imported the xmltv guide every 3-5 minutes automatically.

I haven't changed anything afa this goes. So it should work exactly as the standard plugin. That is, it checks for changes to the tvguide.xml file once every minute. I'll look into this further though.
 

Users who are viewing this thread

Top Bottom