| |||||||
| Development You want to code something for the TV-Server? Share it in here! |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: Jul 2007 Location: Luleć
Posts: 191
Thanks: 1
Thanked 18 Times in 6 Posts
Country: | 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 Last edited by Laban; 2007-10-23 at 06:30. |
| | |
| |
| | #2 (permalink) |
| Portal Member Join Date: Jul 2007 Location: Luleć
Posts: 191
Thanks: 1
Thanked 18 Times in 6 Posts
Country: | 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 22:08. |
| | |
| | #4 (permalink) |
| Portal Member Join Date: Jul 2007 Location: Luleć
Posts: 191
Thanks: 1
Thanked 18 Times in 6 Posts
Country: | 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 17:21. |
| | |
| This User Say Thank You: |
| | #5 (permalink) |
| Portal Member Join Date: Jul 2006 Location: Alcalá de Henares
Posts: 85
Thanks: 4
Thanked 1 Time in 1 Post
Country: | Thank you very much Laban, I asked for this some time ago: http://forum.team-mediaportal.com/as...ls-t22197.html Thanks Dareh. |
| | |
| | #7 (permalink) |
| Portal Member Join Date: Jul 2007 Location: Luleć
Posts: 191
Thanks: 1
Thanked 18 Times in 6 Posts
Country: | 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. |
| | |
| | #8 (permalink) |
| Portal Member Join Date: Jul 2007 Location: Luleć
Posts: 191
Thanks: 1
Thanked 18 Times in 6 Posts
Country: | 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. |
| | |
| | #9 (permalink) |
| Portal Member Join Date: Feb 2007
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts
Country: | 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 |
| | |
| | #10 (permalink) |
| Project Coordinator Join Date: Dec 2004 Location: 127.0.0.1 Age: 28
Posts: 5,946
Thanks: 151
Thanked 112 Times in 78 Posts
Country: | 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! |
| | |
![]() |
| Bookmarks |
| Tags |
| binary, source, xmltv |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 problems with XMLTV | ChuckTX | xmlTV | 2 | 2007-03-09 17:54 |
| XMLtv | tvviewer | Installation, configuration support | 4 | 2006-08-24 17:25 |
| Help with xmltv | donmega | General Support | 4 | 2005-11-21 23:02 |
| XMLTV | blackfundi | Plugins/Erweiterungen | 1 | 2005-09-05 10:19 |
| XMLTV Automate | Anonymous | Tips and Tricks | 4 | 2005-01-17 14:53 |