MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal TV-Server » Help on Development » Development


Development You want to code something for the TV-Server? Share it in here!

Reply
 
Thread Tools Display Modes
Old 2007-07-07, 21:52   #1 (permalink)
Portal Member
 
Join Date: Jul 2007
Location: Luleć
Posts: 192
Thanks: 1
Thanked 18 Times in 6 Posts

Country:


Default xmltv 2 ? (source + binary now available)

Hi

I had a few issues with the xmltv plugin as i've mentioned here in another thread:

http://forum.team-mediaportal.com/xm...ng-t25072.html

So i decided to have a go at doing some changes that i think/hope will help (at least help me) when using the xmltv plugin.

The basic idea is that you'll map the channels "manually" (channel.externalid -> guide.id) using a new mapping function that i've added to the XmlTvImport plugin.

The import is then changed so that it maps the guidechannels using channel.externalid - guide.id instead of channel.Name - guide.display-name.

I've attached some screenshots on how you use this mapping tool.

It works like this:

1:

You'll load the channels/mappings (firstload.jpg). The tvguide-channels are loaded from the tvguide.xml (tvguide.lst...) and mapped using the display-name. Start by using the exact name, then first word and then three first letters.
Mappings that are marked (right column) green are exact matches, yellow partial match, red = no match. White = already mapped. Should be no such columns before the first mapping.

2: Edit the channelmappings (removed some incorrect mappings). Click save. (abouttosave.jpg). All mapped channel will be saved.

3: Click Load/Refresh again. All mapped channels should be marked white. (aftersave.jpg)

You can of course order the mappings by clicking on the headers. Id, Name and so forth.

It seems to work as it should but i haven't done any testing of the actual import (programs), i'm saving that for tomorrow. Perhaps i've fucked up the whole thing :-)

But i'd like to get some input on this little project so let me know what you think.

Not sure what to do if this turns out to be something worth adding to the official code but perhaps i'm getting ahead of things here.

Edit: i'll put the source + binaries in this msg from now on. Makes it easier to find it.

Last updates:

fixed bug where the importer would run once every minute.

BBC3 and BBC 3 will now become an exact match (green) rather then a partial (yellow).

Added support for 1-n display names in the tvguide

Fixed bug concerning duplicate display-names in the tvguide.

Edit: 2007-07-16:

Added group combobox when loading channels
Added "load radio" channels checkbox, default off

The screenshots aren't exactly up-to-date atm, though i guess it doesn't matter that much

I'll start to call it a Beta release from now on, seems to work as it should, for me at least :-)

Edit: 20070814:

Fixed importing .lst files and a progressbar issue when saving the mappings. Source code not available in the latest .zip, i'll fix that asap.

Edit: 20070823: latest SVN introduces a change in the channel , name and displayname are separated (a really good idea). Added a fix for this (download the _latestsvn version). Haven't had time to test it but it should work. There are some additional stuff in this version also, checkbox for visible in guide in the mappings table f.e

Edit: 20070824: fixed star-rating bug

Edit: 20070910: for the latest svn. (Note: might work, will test it after work today)

Edit: 20070929: Fixed the & problem, hopefully (used ConvertHTMLToAnsi.. for the title & description)

Edit: 20071023: Changed the "Delete before import" functionality. Now it only removes the programs the for the channels available in the tvguide.xml file(s) before importing, used to be "delete from program".

/Laban
Attached Thumbnails
xmltv-2-source-binary-now-available-firstload.jpg  xmltv-2-source-binary-now-available-abouttosave.jpg  xmltv-2-source-binary-now-available-aftersave.jpg  
Attached Files
File Type: zip XmlTvImport2.zip (25.8 KB, 1211 views)
File Type: zip XmlTvImport2_source.zip (46.5 KB, 181 views)

Last edited by Laban; 2007-10-23 at 07:30.
Laban is offline   Reply With Quote
Old 2007-07-07, 21:59   #2 (permalink)
Portal Member
 
Join Date: Jul 2007
Location: Luleć
Posts: 192
Thanks: 1
Thanked 18 Times in 6 Posts

Country:


Default

And of course there's a little bug if you look at the screenshots.. Fixed.. Hopefully, nobody noticed :-)

I also added a checkbox for turning on/off partial matches. The idea is that you have it on the first time you do the mappings, when you do the major part of the work. Then you have it off when you f.e make a new autotune to scan for changes, new channels . I noticed that it can be rather annoying to have to go through all the partial matches and turn them off when you know that they aren't correct anyway.

Last edited by Laban; 2007-07-07 at 23:08.
Laban is offline   Reply With Quote
Old 2007-07-08, 09:30   #3 (permalink)
Portal Member
 
Join Date: Feb 2007
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts

Country:


Default

I was following the thread on the xmltv, and it seems to me a good idea to manage in a flexible manner the import of the tv guide.
Look forward to test the new plugin.

Thx
fab70 is offline   Reply With Quote
Old 2007-07-08, 15:03   #4 (permalink)
Portal Member
 
Join Date: Jul 2007
Location: Luleć
Posts: 192
Thanks: 1
Thanked 18 Times in 6 Posts

Country:


Default

Ok, here's the ALPHA version. Seems to work as it should, though i've only done some limited testing. Will test it more when my TV-Card wants to cooperate a bit better with the TV-Engine (Technotrend S-3200 + CI).

The XmlTvImport2.dll is included in the .zip file. And the sourcecode, if someone is interested.

Installation: copy the XmlTvImport2.dll to the mediaportal - tv-server installaton dir, plugin dir, in my case:

C:\Program Files\Team MediaPortal\MediaPortal TV Server\Plugins

Use: uncheck the xmltv plugin, check xmltv2.plugin in the TV-Server plugins.

Although you could actually skip checking the xmltv2 plugin initially, until you verified that the mappings are ok.

Autotune if it's a new installation, do the mappings, save, load if you want to verify the mappings. Go to the settings, try a manual import (added a import button). See that the result is is "..imported successfully", can take some time depending on the amount of days forward you grab the programs.

And you're done. Don't forget to enable the xmltv2 plugin if you skipped that initially.

UPDATE: improved import. Now handles multiple channels mapped to the same guide channel. Should also be a lot faster if i'm not mistaken.

UPDATE2: removed the automatic import of channels if their name's are matching. This means that channels won't be mapped unless you do it through the mapping function. Also added a export function that just writes all the channels that are mapped (from the grid/gui, not the database, so you need to load the mappings first) to a file. And another one by request, a choice to remove all current programs on every import so that potential incorrect data is replaced.

Send bugreports to dev@null.com

Edit: i moved the binaries + source to the first post
/Laban

Last edited by Laban; 2007-07-10 at 18:21.
Laban is offline   Reply With Quote
This User Say Thank You:
Old 2007-07-08, 19:15   #5 (permalink)
Portal Member
 
Join Date: Jul 2006
Location: Alcalá de Henares
Posts: 90
Thanks: 5
Thanked 3 Times in 2 Posts

Country:

My System

Default

Thank you very much Laban, I asked for this some time ago:
http://forum.team-mediaportal.com/as...ls-t22197.html

Thanks
Dareh.
dareh is offline   Reply With Quote
Old 2007-07-08, 19:43   #6 (permalink)
Portal Member
 
Join Date: Dec 2006
Posts: 49
Thanks: 2
Thanked 0 Times in 0 Posts

Country:


Default

Hi Laban, I hope that this "little" plugin will be included on the official releases.

Thank you for your great work!

I will try it next, and let you know.
Hemin is offline   Reply With Quote
Old 2007-07-08, 20:14   #7 (permalink)
Portal Member
 
Join Date: Jul 2007
Location: Luleć
Posts: 192
Thanks: 1
Thanked 18 Times in 6 Posts

Country:


Default

Noticed a bug, a last minute change that i forgot to test. Not sure if it's in the .dll that i've added to my previous post but i've updated the .zip file with both the binary and source code with the fix, just in case.
Laban is offline   Reply With Quote
Old 2007-07-08, 20:33   #8 (permalink)
Portal Member
 
Join Date: Jul 2007
Location: Luleć
Posts: 192
Thanks: 1
Thanked 18 Times in 6 Posts

Country:


Default

Noticed another bug. The import doesn't handle mappings where one guide channel is mapped to two tuning channels, as i suspected. I need to rewrite some parts of the import for this to work. Shouldn't be a big problem though.
Laban is offline   Reply With Quote
Old 2007-07-08, 23:00   #9 (permalink)
Portal Member
 
Join Date: Feb 2007
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts

Country:


Default

Hi Laban,

tested with a very simple configuration (1 card and few channels) and it worked perfectly.

I'll test a more complex configuration in coming days and I let you know.

Ciao
fab70 is offline   Reply With Quote
Old 2007-07-09, 07:55   #10 (permalink)
Project Coordinator
 
infinityloop's Avatar
 
Join Date: Dec 2004
Location: 127.0.0.1
Age: 29
Posts: 6,214
Thanks: 174
Thanked 135 Times in 97 Posts

Country:

My System

Default

this looks absolutly great!

__________________
regards
chris

MediaPortal Project Coordinator
Test Team Leader

Do not start to moan if something is not working as you want it to be.
Remember that MediaPortal is Open Source.
YOU can improve it!
infinityloop is offline   Reply With Quote
Reply

Bookmarks

Tags
binary, source, xmltv

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 problems with XMLTV ChuckTX xmlTV 2 2007-03-09 18:54
XMLtv tvviewer Installation, configuration support 4 2006-08-24 18:25
Help with xmltv donmega General Support 4 2005-11-22 00:02
XMLTV blackfundi Plugins/Erweiterungen 1 2005-09-05 11:19
XMLTV Automate Anonymous Tips and Tricks 4 2005-01-17 15:53


All times are GMT +1. The time now is 04:36.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden